Overview (VCL) - EtheaDev/SVGIconImageList GitHub Wiki

Overview of the VCL components

Those Components are available at "Ethea" page, after installing the design-time Package located in \Packages\DXXX\dclSVGIconImageList.dpk

TSVGVirtualImageCollection

https://github.com/EtheaDev/SVGIconImageList/blob/master/Packages/SVGIconImageCollectionComponentIcon.png

TSVGImageCollection is a VCL component for Delphi that contains a list of TSVGIconItem, a set of SVG (Scalable Vector Graphics) images.

Properties

  • SVGIconItems: a collection of SVGIconItem (the Images)

Properties available for single Icon:

  • SVGText: the text of image in SVG format
  • SVGIconName (optional): a name associated to the icon (default the filename)
  • GrayScale: (default false) to apply grayscale color effect to the icon
  • FixedColor: (TColor: default clDefault) to apply a single fixed color to the Icon
  • AntialiasColor: (default clBtnFace): to define the color for Antialias when a Bitmap is requested

Methods

  • Add
  • Delete(Index)
  • Remove(Index)
  • IndexOf(Name)
  • ClearIcons
  • Count: of icons into Collection

Advanced Component Editor

At design time is very easy to build the collection Icons using The Advanced Component Editor supplied with the component.

TSVGIconVirtualImageList

TSVGIconVirtualImageList is a VCL component for Delphi that can be linked to an SVGImageCollection, to provide an ImageList of SVG Icons that can be scaled at any resolution and DPI scale factor.

https://github.com/EtheaDev/SVGIconImageList/blob/master/Packages/SVGIconVirtualImageListComponentIcon.png

Properties

At component level you can define:

  • Collection: the collection of the icons (see TSVGIconCollection)
  • Size (in pixel) of the icons or Width and Height (Width and Height can be different)
  • Width and Height (if the width and Height are different)
  • Opacity: (from 255 to 0) to set Opacity of all Icons
  • Scaled: (from Delphi 10.3)
  • GrayScale: (default false) to apply grayscale color effect to any icon of the collection
  • FixedColor: (TColor: default clDefault) to apply a single fixed color to any icon of the collection
  • AntialiasColor: (default clBtnFace): to define the color for Antialias when a Bitmap is requested

Access to image collection:

  • Images[Index]: TSVG
  • Names[Index]: string

Methods

Multiple Icons methods:

  • LoadFromFiles
  • GetIndexByName
  • DPIChanged

TSVGIconImageList

TSVGIconImageList is a VCL component for Delphi derived from TImageList component, that build icons using SVG (Scalable Vector Graphics) images using an embedded Image Collection (SVGIconItems) of TSVGIconItem items.

https://github.com/EtheaDev/SVGIconImageList/blob/master/Packages/SVGIconImageListComponentIcon.png

Properties

At component level you can define:

  • Size (in pixel) of the icons or Width and Height (Width and Height can be different)
  • Opacity: (from 255 to 0) to set Opacity of all Icons
  • SVGIconItems: the collection of the icons (TSVGIconItems collection of TSVGIconItem).
  • Scaled: (from Delphi 10.3)
  • GrayScale: (default false) to apply grayscale color effect to any icon of the collection
  • FixedColor: (default inherit_color) to apply a single fixed color to any icon of the collection
  • AntialiasColor: (default clBtnFace): to define the color for Antialias when a Bitmap is requested

At SVGIconItem level you can define:

  • SVGText: the text of image in SVG format
  • GrayScale: (default false) to apply grayscale color effect to the icon
  • FixedColor: (default inherit_color) to apply a single fixed color to the icon
  • IconName (optional): a name associated to the icon (default the filename)
  • AntialiasColor: (default clBtnFace): to define the color for Antialias when a Bitmap is requested

Name and Category are also available for SVGIconItem, but the only property stored is IconName (Category + \ + Name).

Methods

Method available for single Icon:

  • Add
  • Delete (index)
  • Remove (by name)
  • Replace

Multiple Icons methods:

  • LoadFromFiles
  • Clear
  • RecreateBitmaps

Advanced Component Editor

At design time is very easy to build the Icons using The Advanced Component Editor supplied with the component.

TSVGIconImage

TSVGIconImage is a VCL component for Delphi derived from TCustomControl component, that shows a single SVG icon (Scalable Vector Graphics) from the SVGIconImageList connected, with DoubleBuffer support.

https://github.com/EtheaDev/SVGIconImageList/blob/master/Packages/SVGIconImageComponentIcon.png

Properties

  • ImageList: the connected SVGIconImageList
  • ImageIndex: the index of the Image
  • SVG: the TSVG object inside
  • SVGText: SVG text (alternative to ImageList + ImageIndex)
  • GrayScale: (default false) to apply grayscale color effect to the image
  • FixedColor: (TColor: default clDefault) to apply a single fixed color to the image

Property Editor

At design you can use the Property Editor for SVGText value.

Look how to use those components with the Demo Project (VCL)