Pen::GetDashOffset method (gdipluspen.h)

The Pen::GetDashOffset method gets the distance from the start of the line to the start of the first space in a dashed line.

Syntax

REAL GetDashOffset();

Return value

Type: REAL

This method returns a real number that indicates the distance from the start of the line to the start of the dashes.

Remarks

A positive return value shifts the first dash forward along the path, and a negative return value shifts the start of the path forward along the first dash.

Examples

The following example assumes that dashPen has been defined with a certain dash style and gets the dash offset value.

REAL dashOffset = dashPen.GetDashOffset();

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdipluspen.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Drawing a Custom Dashed Line

Pen

Pen::SetDashOffset

Pens, Lines, and Rectangles