CustomLineCap::Clone Method ()

 

Creates an exact copy of this CustomLineCap.

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public:
virtual Object^ Clone() sealed

Return Value

Type: System::Object^

The CustomLineCap this method creates, cast as an object.

The following example is designed for use with Windows Forms, and it requires PaintEventArgse, an Paint event object. The code performs the following actions:

  • Creates a custom line cap by using the GraphicsPath object.

  • Creates a CustomLineCap object, firstCap,using the GraphicsPath object just created.

  • Creates a clone of firstCap by using the Clone method.

  • Sets up the CustomStartCap and CustomEndCap properties of the Pen object, and uses that pen to draw a line and the custom caps to the screen.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: