Pen::SetMiterLimit method (gdipluspen.h)
The Pen::SetMiterLimit method sets the miter limit of this Pen object.
Syntax
Status SetMiterLimit(
[in] REAL miterLimit
);
Parameters
[in] miterLimit
Type: REAL
Real number that specifies the miter limit of this Pen object. A real number value that is less than 1.0f will be replaced with 1.0f.
Return value
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Remarks
The miter length is the distance from the intersection of the line walls on the inside of the join to the intersection of the line walls outside of the join. The miter length can be large when the angle between two lines is small. The miter limit is the maximum allowed ratio of miter length to stroke width. The default value is 10.0f.
If the miter length of the join of the intersection exceeds the limit of the join, then the join will be beveled to keep it within the limit of the join of the intersection.
Examples
The following example creates a Pen object and sets the miter limit for the pen.
Pen pen(Color(255,255,0,0), 4.0f);
Status stat = pen.SetMiterLimit(10.0f);
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 |