Lazarus
Programming => Graphics and Multimedia => Graphics => Topic started by: AlexTP on December 20, 2018, 06:52:34 pm
-
For ex, I have SVG file or StringList with its text. I want to paint it on canvas at (x,y) with given sizes (nx,ny).
How to do it?
-
bgrabitmap would probably be what you want: https://github.com/bgrabitmap/bgrabitmap
(load from stream/file)
https://github.com/bgrabitmap/bgrabitmap/blob/ecdea28344839d2cae597c6ca4e90c29bf692eba/bgrabitmap/bgrasvg.pas#L139
there's a Draw method which works with a TBGRACanvas2D, but the canvas probably has some "ToBitmap" method or the like
-
A list of libraries with SVG reading/writing/rendering, taken from the wiki page: Graphics libraries (http://wiki.freepascal.org/Graphics_libraries)
- AggPas (http://www.crossgl.com/aggpas/) (in {lazarus folder}/components/aggpas)
- BGRABitmap (http://wiki.freepascal.org/BGRABitmap)
- fpvectorial (http://wiki.freepascal.org/fpvectorial)
Also, from FPC Package list (http://wiki.freepascal.org/Package_List)
- librsvg (in {FPC source}/packages/librsvg)
And I'm sure there are more somewhere out there :)