I use some ImageCollections. I use LightMode, DarkMode, GrayMode, some own Color modes.
I have searched for an easy way to use colored svg images. But nothing found.
Now, I have made a "hack" in your source.
In AdvImageCollection the CollectionItem has 3 new published properties.
property OwnFillColor: TColor
property OwnOpacity: Single
property UseOwnColorStyle: Boolean
I have made changes in unit AdvTypes and AdvGraphicsSVGEngine
Only a few lines.
But when the next update comes, I get trouble.
Can you make this (or similar) in the next updates?
Can I attach the 2 units here? I don't know. Everybody can see the source.
Please send your units to firstname.lastname@example.org with a reference to this post.
I have send the 2 units.
Currently I have made the change for myself "on the fly".
I think there are a few details that need to be expanded / tweaked for general use.
It would be nice if that comes in the next version.
Thanks for taking it into account in one of the next SVG extensions.
I've also given only little thought to it. I'm sure you're doing a lot better.
Thanks for your feedback.
I would be happy for this, too!
We have implemented this in the following way:
CustomFillColor / CustomStrokeColor: change the overal fill and stroke color of an SVG element if the element has a fill and/or stroke color defined (default value is -1), when -1, default fill and stroke color is applied
CustomOpacity: change the overal opacity (default value is -1), when -1 default opacity is applied
TintColor: applied on top of the default fill and stroke color (default value is -1)
GrayScale: changes the SVG to have a gray scale look and feel (default value is false)
These properties are accessible in the SVG image collection item as well as a outside the SVG image collection programmatically, by converting the TGraphic to a TAdvSVGBitmap.
Changes are also available in FNC through TTMSFNCSVGBitmap and TTMSFNCSVGImageCollectionItem.
Next version of both TMS FNC Core and TMS VCL UI Pack will have this included.
Wonderful news. Can't wait for it
When will the new version be available?
It was integrated in TMS VCL UI Pack v10.6.7.0