TGraphicTool( unit KOL.pas ) ï TObj ï _TObj
TGraphicTool = object( TObj )
Incapsulates all GDI objects: Pen, Brush and Font.
property Handle: THandle;
Ñ
Every time, when accessed, real GDI object is created (if it is
not yet created). So, to prevent creating of the handle, use
HandleAllocated instead of comparing Handle with value 0.
property Color: TColor;
Color is the most common property for all Pen, Brush and
Font objects, so it is placed in its common for all of them.
property BrushBitmap: HBitmap;
Brush bitmap. For more info about using brush bitmap,
see Delphi or Win32 help files.
property BrushStyle: TBrushStyle;
Brush style.
property BrushLineColor: TColor;
Brush line color, used to represent lines in hatched brush. Default value is clBlack.
property FontHeight: Integer;
Font height. Value 0 (default) says to use system default value,
negative values are to represent font height in "points", positive
- in pixels. In XCL usually positive values (if not 0) are used to
make appearance independent from different local settings.
property FontWidth: Integer;
Font width in logical units. If FontWidth = 0, then as it is said
in Win32.hlp, "the aspect ratio of the device is matched against the
digitization aspect ratio of the available fonts to find the closest match,
determined by the absolute value of the difference."
property FontPitch: TFontPitch;
Font pitch. Change it very rare.
property FontStyle: TFontStyle;
Very useful property to control text appearance.
property FontCharset: TFontCharset;
Do not change it if You do not know what You do.
property FontQuality: TFontQuality;
Font quality.
property FontOrientation: Integer;
It is possible to rotate text in XCL just by changing this
property of a font (tenths of degree, i.e. value 900 represents
90 degree - text written from bottom to top).
property FontWeight: Integer;
Additional font weight for bold fonts (must be 0..1000). When set to
value <> 0, fsBold is added to FontStyle. And otherwise, when set to 0,
fsBold is removed from FontStyle. Value 700 corresponds to Bold,
400 to Normal.
property FontName: KOLString;
Font face name.
property PenWidth: Integer;
Value 0 means default pen width.
property PenStyle: TPenStyle;
Pen style.
property PenMode: TPenMode;
Pen mode.
property GeometricPen: Boolean;
True if Pen is geometric. Note, that under Win95/98 only pen styles
psSolid, psNull, psInsideFrame are supported by OS.
property PenBrushStyle: TBrushStyle;
Brush style for hatched geometric pen.
property PenBrushBitmap: HBitmap;
Brush bitmap for geometric pen (if assigned Pen is functioning as
its style = BS_PATTERN, regadless of PenBrushStyle value).
property PenEndCap: TPenEndCap;
Pen end cap mode - for GeometricPen only.
property PenJoin: TPenJoin;
Pen join mode - for GeometricPen only.
property LogFontStruct: TLogFont;
by Alex Pravdin: a property to change all font structure items at once.
procedure Changed;
N
function GetHandle: THandle;
N
destructor Destroy; virtual;
function HandleAllocated: Boolean;
Returns True, if handle is allocated (i.e., if real GDI
objet is created.
function ReleaseHandle: Integer;
Returns Handle value (if allocated), releasing it from the
object (so, it is no more knows about this handle and its
HandleAllocated function returns False.
function Assign( Value: PGraphicTool ): PGraphicTool;
Assigns properties of the same (only) type graphic object,
excluding Handle. If assigning is really leading to change
object, procedure Changed is called.
procedure AssignHandle( NewHandle: Integer );
Assigns value to Handle property.
function IsFontTrueType: Boolean;
Returns True, if font is True Type. Requires of creating of a Handle,
if it is not yet created.
property OnChange: TOnGraphicChange;
Called, when object is changed.
[ Index ]
This help is generated 14-Jun-2010 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov
Modified (C) 2003 by Alexander Bartov