Export (0) Print
Expand All

Pen.SetLineJoin method

Applies to: desktop apps only

The Pen::SetLineJoin method sets the line join for this Pen object.

Syntax

Status SetLineJoin(
  [in]  LineJoin lineJoin
);

Parameters

lineJoin [in]

Type: LineJoin

Element of the LineJoin enumeration that specifies the join style used at the end of a line segment that meets another line segment.

Return value

Type:

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.

Examples

The following example creates a Pen object, sets the line join style, and draws a rectangle. The code then resets the line join style and draws a second rectangle.


VOID Example_SetLineJoin(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a pen.
   Pen pen(Color(255, 0, 0, 255), 15);

   // Set the join style, and draw a rectangle.
   pen.SetLineJoin(LineJoinRound);
   graphics.DrawRectangle(&pen, 20, 20, 150, 100);

   // Reset the join style, and draw a second rectangle.
   pen.SetLineJoin(LineJoinBevel);
   graphics.DrawRectangle(&pen, 200, 20, 150, 100); 
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdipluspen.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Pen
Pen::GetEndCap
Pen::GetStartCap
LineCap
Pen::SetEndCap
Pen::SetLineCap
Pen::SetStartCap
Joining Lines
Pens, Lines, and Rectangles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft