|
Döner Möllensen - 2016-02-19 17:36:02
Hello,
I need to read a SVG file and check the size of all vector items together. Like the bounding box of all drawings to check if all fits into a certain area or not.
Can I do this with you classes?
Thank you!
Eduardo "Trial Force" Bonfandini - 2016-02-19 18:32:22 - In reply to message 1 from Döner Möllensen
Hi Doner!
The class is very helpfull to generated SVG.
You can make a for by all elements in SVG, and get it width and height.
But the class don't have a ready method to do what you want.
Regards.
Orlin Vakarelov - 2016-03-02 17:41:36 - In reply to message 2 from Eduardo "Trial Force" Bonfandini
Hello,
This is just a clarification to the answer of the question? When you say that the library cannot do what Donor asked, do you mean: it cannot import SVG files, or it cannot compute bounding boxed?
Also, I didn't see any classes representing Bézier curves. Is this correct?
The reason I am asking is because I am looking for a package to import an SVG file and convert it into php objects that can be manipulated in various way. This includes ways that SVG does not support, such as non-linear transformations.
Eduardo "Trial Force" Bonfandini - 2016-03-02 18:26:35 - In reply to message 3 from Orlin Vakarelov
Hi Orlin!
The class can import SVG files, they "transform" into php object in a hierarchy.
By default it cannot calculate the bounding box, but you can traverse all the objects and calcute it "manually".
But you can make what you want with the objects, its a php object change it like you wish.
Internally the classes use default php xml class, so it's very easy to change all behavior.
In next few weeks I will have to improve that libray. I receive a paid work to deal with SVG and I will use it, so the class will be very improved (like php 7.0 support).
Thanks for your comment.
Orlin Vakarelov - 2016-03-02 19:24:34 - In reply to message 4 from Eduardo "Trial Force" Bonfandini
Great. This looks promising! I will be looking foreword to the new changes. I will probably add quite a bit of functionality to the project to allow more complex geometric transformations and constructions.
One thing I am planning to do is use octave (http://www.gnu.org/software/octave/) as a rendering engine, without having to convert back to SVG. This opens very interesting possibilities for extending SVG functionality.
|