SVGIconImageList
Four engines to render SVG (Delphi Image32, Delphi TSVG, Direct2D wrapper or Cairo wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Component | Description |
---|---|
Для просмотра ссылки Войди | TSVGIconImageCollection is collection of SVG Images for Delphi to provide a centralized list of images for SVGIconVirtualImageLists (only for VCL) |
Для просмотра ссылки Войди | TSVGIconVirtualImageList is a special "virtual" ImageList for Delphi linked to an SVGIconImageCollection (only for VCL) to simplify use of SVG Icons (resize, opacity, grayscale and more...) |
Для просмотра ссылки Войди | TSVGIconImage is an extended Image component for Delphi (VCL+FMX) to show any SVG image directly or included into a an SVGIconImageList with all functionality (stretch, opacity, grayscale and more...) |
Для просмотра ссылки Войди | TSVGIconImageList is an extended ImageList for Delphi (VCL+FMX) with an embedded SVG image collection: the VCL component is deprecated, we recommend to use SVGIconImageCollection + SVGIconVirtualImageList also for older Delphi versions! |
Very important notice
TVirtualImageList (available from D10.3) and TSVGIconVirtualImageList both use images from TSVGIconImageCollection. An important difference is that TVirtualImageList may use and create only a subset of the images in the collection, whereas TSVGIconVirtualImageList creates all images of the collection everytime it is needed (e,g. DPI change), which is slower and consumes more memory.Although TVirtualImageList does not have the FixedColor, GrayScale and Opacity properties, these properties exist at the TSVGIconImageCollection and they would be reflected on the linked TVirtualImageList.
We advise that TSVGIconVirtualImageList should be used only for versions of Delphi before 10.3. For recent versions of Delphi the recommended combination should be TSVGIconImageCollection + TVirtualImageList. Don't forget also the importance of PreserveItems when you have a large ImageCollection with many linked Actions. Without setting this property to "True", everytime you add or remove an icon in the collection, you have to check and change the ImageIndex of all the Actions.
From D10.3 version, the TSVGIconImageCollection inherits from TCustomImageCollection, so you can also use it with the TVirtualImage component and place SVG icons into the new TControlList component (available from Delphi 10.4.2), as explained Для просмотра ссылки Войди
Performance comparison
This table shows the performance of the four rendering engines tested with SVGExplorer, using a significant amount of icons from different sets, rendered at 32x32 pixels.Count | Icon set | TSVG | Image32 | D2D | Cairo |
---|---|---|---|---|---|
997 | Font-Awesome | 453ms | 453ms | 672ms | 516ms |
654 | Papirus | 547ms | 781ms(1) | 547ms | 891ms(1) |
5366 | Material-Design | 5031ms | 5094ms | 6531ms | 5828ms |
(1)Notice that Image32 and Cairo are the only engines capable of rendering blur effect (that is always slow to calculate): this is the reason of "slow" performance to render Papirus icons that contains blur effect.
Available from Delphi XE3 to Delphi 10.4 (32bit and 64bit platforms)
Для просмотра ссылки ВойдиSample image of VCL version Для просмотра ссылки Войди
Sample image of FMX (Windows) version Для просмотра ссылки Войди
Sample image of the VCL SVGText-property editor Для просмотра ссылки Войди
UTILITY
The Для просмотра ссылки ВойдиYou can use Для просмотра ссылки Войди