EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
327 stars 96 forks source link

DPI parameter #243

Closed insp63 closed 2 years ago

insp63 commented 2 years ago

Delphi 10.3 - When the DPI parameter is set to 125%, the icons increase as if it is an ordinary picture and not an SVG. It is possible because of the set values of height and width. The icon is stretched by means of Windows and not by means of Delphi 100% dpi 125% dpi settings

carloBarazzetta commented 2 years ago

Hello, in the VCL implementation, using VirtualImageList and SvgIconImageCollection, the icons are painted at the VirtualImageList size, because VirtualImageList scales automatically by TVirtualImageList.DPIChangedMessageHandler. When the size of the virtualimagelist changes, the icons are repainted at the correct size. Are you using VirtualImageList/SvgIconImageCollection like explained here? wiki/Virtual-image-collection Look those two pictures, of the Demo application, the first with 100% dpi and the second with 150% dpi: the VirtualImageList placed on main form scales automatically. image image

insp63 commented 2 years ago

Thanks. As soon as I put VirtualImageList everything worked out