Sign in Join
FPDoc Onlineexperiment

TPen.Cosmetic property

Member of TPenpublishedIn unit Graphics

Indicates whether the Pen is Cosmetic (non-geometric).

Declaration

pascal
property Cosmetic: Boolean read FCosmetic write SetCosmetic default True;

Description

Cosmetic is a Boolean property which indicates whether the pen is a Cosmetic one. When set to False, it is a Geometric pen.

A pen can be either Cosmetic or Geometric. A cosmetic pen is always 1 pixel wide, while a geometric pen can have any width. The width of a geometric pen is defined in world units and thus depends on transforms (scaling, rotation, shear, reflection) applied to a canvas. Operations using a cosmetic pen are faster.

The default value for the property is True.

Setting a new value for the property causes the pen Reference to be re-created. The Changed method is called to signal the OnChange event handler (when assigned).

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