[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TCustomShape.Pen

The Pen used to draw lines on the shaped control.

Declaration

Source position: extctrls.pp line 300

public property TCustomShape.Pen : TPen
  read FPen
  write SetPen;

Description

Pen is a TPen property which contains the attributes used to draw lines for the shape on the control. Its Color property can be used to control the fill color for the lines. Its Style property determines the line drawing style like solid, dotted, or dashed.

Resources allocated to Pen are managed by the class instance in the Create and Destroy methods. Setting a new value for the property causes Invalidate to be called to redraw the control.

Brush and Pen are used in the DrawToCanvas method, and in UpdateMask when the internal mask image is created for the shaped control.

Use Brush to set attributes like the fill color and opacity for the Shape on the control.

See also

TCustomShape.Brush

  

The Brush used to fill the shaped control.

TCustomShape.Create

  

Constructor for the class instance.

TCustomShape.Destroy

  

Destructor for the class instance.

TCustomShape.DrawToCanvas

  

Draws the Shape for the control on the specified canvas.

TCustomShape.UpdateMask

  

Updates the internal Monochrome bitmap used as a mask to detect mouse click events on the shaped control.

TPen

  

Represents a pen used to draw on a canvas.

TControl.Invalidate

  

Causes a delayed Repaint of the control by marking its visible area of the control as invalid.


Version 4.0 Generated 2025-05-03 Home