Delphi SVGIconImageList

ADSoft

Местный
Регистрация
1 Окт 2007
Сообщения
223
Реакции
86
Credits
1,095

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...)

ComponentDescription
Для просмотра ссылки Войди или Зарегистрируйся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​
As you can see, the four engines perform differently depending on the icons and their complexity, but the two native Delphi implementation are the best.

(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 Для просмотра ссылки Войди или Зарегистрируйся utility is useful to explore and preview your svg image collections.

You can use Для просмотра ссылки Войди или Зарегистрируйся if you want to see your icons directly into Windows Explorer or you want to edit them using a powerful SVG Text Editor.

DOCUMENTATION​

Follow the Для просмотра ссылки Войди или Зарегистрируйся to known how to use those components to modernize your Delphi VCL or FMX Windows applications scalable, colored and beautiful with few lines of code.
 

ADSoft

Местный
Регистрация
1 Окт 2007
Сообщения
223
Реакции
86
Credits
1,095
SVGIconImageList official 2.4.0 version (VCL + FMX) released at 22 Jul 2021
  • Updated and aligned to Image32 ver.3 library
  • Added packages for Delphi 11 Olympus
Скрытое содержимое могут видеть только пользователи групп(ы): Premium, Местный, Свои
 

ADSoft

Местный
Регистрация
1 Окт 2007
Сообщения
223
Реакции
86
Credits
1,095
SVGIconImageList 3.0 (VCL & FMX ) from GetIt at August 30, 2021
Скрытое содержимое могут видеть только пользователи групп(ы): Premium, Местный, Свои