Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WinSvgSupported function in unit D2DSVGFactory fails in older Delphi versions #290

Open
jrathlev opened this issue Jan 9, 2025 · 4 comments

Comments

@jrathlev
Copy link

jrathlev commented Jan 9, 2025

In the D2DSVGFactory unit, the required Windows version (Windows 10 Creators Update) is queried at the very end (function WinSvgSupported). In older Delphi versions, e.g. 10 Seattle, TOSVersion returns an incorrect build number (always 0), so that the query does not work, see here.

Instead of TOSVersion, the functions from my SysInfo unit (see attached file) can be used at this point:
Result:=CheckOSVersion(10,0) and CheckOSBuild(15063)

SystemInfo.zip

@carloBarazzetta
Copy link
Contributor

Thank you for your feedback, D2DSVGFactory was created by @pyscripter, I don't use it because the SVG support is very limited...
Windows SVG Support
I'll fix as soon as possible...

@carloBarazzetta
Copy link
Contributor

To @jrathlev
By the way, why use D2DSVGFactory as the default, when Image32 is superior in both performance and SVG support?
Look at this page:
https://ethea.it/docs/svgiconimagelist/SVG-Viewer-(VCL).html
Do you have some svg that Image32 cannot render properly?
Image32 is the best "native" Delphi implementation for SVG, at the moment (and no dlls like Skia4Delphi are needed)

@jrathlev
Copy link
Author

I discovered this when trying out the various options. By default, I am using Image32.

@carloBarazzetta
Copy link
Contributor

Note that you can use different engines at runtime, changing which Factory to use, as in the SVG-Viewer demo and the Benchmark demo.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants