TSVGIconItem
Unit: SVGIconItems
Inherits from: TCollectionItem
Description
TSVGIconItem represents a single SVG icon within a TSVGIconItems collection. Each item stores SVG content as XML text and provides rendering properties that can override collection-level settings.
Published Properties
IconName
pascal
property IconName: string;Full name of the icon, optionally including category with backslash separator.
Examples:
- Simple:
'home' - With category:
'Navigation\home'
SVGText
pascal
property SVGText: string;SVG content as XML text.
Rendering Properties
pascal
property FixedColor: TColor; // Default: SVG_INHERIT_COLOR
property ApplyFixedColorToRootOnly: Boolean; // Default: False
property AntiAliasColor: TColor; // Default: clBtnFace
property GrayScale: Boolean; // Default: FalsePublic Properties
SVG
pascal
property SVG: ISVG;Direct access to the SVG interface.
Name / Category
pascal
property Name: string; // Icon name without category
property Category: string; // Icon categoryExample:
pascal
Item.IconName := 'Navigation\home';
ShowMessage(Item.Category); // 'Navigation'
ShowMessage(Item.Name); // 'home'Public Methods
GetBitmap
pascal
function GetBitmap(const AWidth, AHeight: Integer;
const AFixedColor: TColor; const AApplyToRootOnly: Boolean;
const AOpacity: Byte; const AGrayScale: Boolean;
const AAntiAliasColor: TColor = clBtnFace): TBitmap;Generates a bitmap representation of the icon.
Usage:
pascal
var Bmp: TBitmap;
begin
Bmp := Item.GetBitmap(64, 64, clBlue, False, 255, False);
try
Image1.Picture.Assign(Bmp);
finally
Bmp.Free;
end;
end;