Sign in Join
FPDoc Onlineexperiment

TPen class

In unit Graphics

Represents a pen used to draw on a canvas.

Declaration

pascal
TPen = class(TFPCustomPen)

Inheritance

  1. TPen
  2. TFPCustomPen

Description

TPen is a TFPCustomPen descendant which contains settings for a pen used to draw lines and shapes on a canvas. It includes properties that define the color for the pen, the end cap and join style used for line segments, and a pattern used for user-defined line drawing styles.

Essentially, TPen maps the types used for properties in the FCL ancestor class to the types used in the LCL.

TPen is the type used to implement the Pen property in TCanvas.

See also

Properties

ReferencepublicA Reference made to this Pen.
ColorpublishedThe Color of the current Pen.
CosmeticpublishedIndicates whether the Pen is Cosmetic (non-geometric).
EndCappublishedThe sort of EndCap used on the Pen.
JoinStylepublishedJoinStyle - the style of joint where two lines meet or cross.
ModepublishedPen mode for the class instance.
StylepublishedContains the line drawing style for the pen.
WidthpublishedWidth for lines drawn using the Pen.

Methods

DoAllocateResourcesprotectedPerforms actions needed to allocate resources for the class instance.
DoDeAllocateResourcesprotectedPerforms actions to free resources allocated for the class instance.
DoCopyPropsprotectedCopies properties from the specified source to the class instance.
SetColorprotectedSets the value for the Color property.
SetFPColorprotectedSets the pen Color to the specified TFPColor value.
SetEndCapprotectedSpecifies the type of end cap used for the pen if it is a geometric pen.
SetJoinStyleprotectedSets the value for the JoinStyle property.
SetModeprotectedSets the value for the Mode property.
SetStyleprotectedSets the value for the Style property.
SetWidthprotectedSets the value for the Width property.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AssignpublicCopies property values from the specified persistent object.
GetPatternpublicGets the Pattern used in the Pen.
SetPatternpublicSetPattern - specifies the pattern for the pen used when the Pen.Style is psPattern.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.