Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

FMX path #1

Open
HemulGM opened this issue Jun 18, 2023 · 7 comments
Open

FMX path #1

HemulGM opened this issue Jun 18, 2023 · 7 comments

Comments

@HemulGM
Copy link

HemulGM commented Jun 18, 2023

How about making an option not only svg, but also in simple path format?

@shaunroselt
Copy link
Owner

Could you maybe explain more what you mean please?

@HemulGM
Copy link
Author

HemulGM commented Jun 19, 2023

Could you maybe explain more what you mean please?

Convert SVG to path data for TPath component. This will allow the library to be used without a third party component to render SVG

@shaunroselt
Copy link
Owner

That's a good idea. Thank you.

I'll do it 😁

@shaunroselt
Copy link
Owner

Hey @HemulGM

I added a new function to get Path Data Text to it.

You can use it as:

var HouseIconSVGPathData := GetBootstrapIconPathData('house'); // Returns SVG Path Data Text
var ValveSteamIconSVGPathData := GetBootstrapIconPathData('steam'); // Returns SVG Path Data Text
var BrushIconSVGPathData := GetBootstrapIconPathData('brush'); // Returns SVG Path Data Text

@HemulGM
Copy link
Author

HemulGM commented Jun 22, 2023

Great, but I foresee the problem in advance. Not all SVGs only contain "path". Some are drawn with primitives. I found them with you)

@shaunroselt
Copy link
Owner

Yes. I got the same issue with some of them already.

I will improve the function once I have some more time on my hands.

but I decided to commit this so long since it's working on most of them from Bootstrap icons.

@DeveloppeurPascal
Copy link

Hi.
The TPath component is not anymore the better (only) way to show SVG in Delphi. You can use a TSkSVG component from Skia4Delphi (VCL+FMX for all current platforms) or an other library like Image32 used by Ethea's TSVGIconImageList project.
Two days ago I worked on refreshing the look of a game with SVG instead of bitmaps TImageList and created this which can be used on VCL and FireMonkey projects. Perhaps an alternative solution to use this bootstrap icons ?

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

No branches or pull requests

3 participants