Bionic Badger wrote:
I have a few new problems. I'm using the WriteSVG() function of the
a2dCanvas with some canvas objects that use pins and visible
properties.
I will add:
if( object->IsTemporary_DontSave())
return;
Pins and handles have this property, and will not be saved anymore.
However, in the resulting SVG, the pins and the text
labels for the properties are not properly scaled with respect to the
other graphics on the canvas. They're huge, with the pins rendered as
giant black rectangles (irrespective of the pin's stroke/fill settings
I made) and the text labels being far larger than the graphics show on
the canvas.
Pins are in screen coordinates, meaning of you zoom in or our, they stay the
same size. But in the a2dCanavsDocument all is normally defined in coordinates
that do not depend on the view.
wxArt2D is aware of all that, and handles it correctly.
But for SVG, which is zoomable also, all is only in "world" coordinates, and it
does not take into account the size of the view.
wxArt2D native format would, but you don't want that ;-)
Next to that, SVG is limited when it comes to translating wxArt2D its internal
object to some presentation in SVG. In principle all simple objects are
translated already translated into SVG.
See:
void a2dIOHandlerSVGOut::DoSave( const a2dCanvasObject* object, int layer )
Complex object, by default have no SVG output. They could have it. But there
would be no end to it, since wxArt2D is meant to subclass and develop complex
objects.
So all objects in a document, are written to SVG, and there nested children
also. But for complex ones, or your own object, you need to subclass
a2dIOHandlerSVGOut.
I've also made my curves use splines instead of straight
lines, and these are also not rendered in the SVG.
What curves? Polygon?
Maybe there is a bug.
I see at least some lpoints->ConvertSplinedPolygon(10) in there.
Is there any setting to have the SVG renderer scale the graphics
correctly (especially the text),
I don't understand, text should not be a problem.
Maybe send be a screen shot to understand your problem?
or perhaps with the pins, just
disable them altogether in the resulting SVG since they seem to not
scale in the canvas either (on a side-note, with the pins in the
canvas, is there a setting to allow them to scale with the other
graphics when zoomed?)?
a2dPin pin not. it has no size in world, only a m_pixelExtend.
See a2dPin::DoUpdate()
But you might be able to derived, and develop your own pin.
Still i wonder what you are using the pins for. Normally no one wants them to
zoom.
The spline rendering would also be nice, but
I can make some adjustments to not need them for now.
That we should be able to solve, if i get what your doing.
Also you can help, by setting some breakpoint in a2dIOHandlerSVGOut to see what
your problem comes down to ;-)
Regards,
Klaas
--
Unclassified
------------------------------------------------------------------------------------------------------------
Disclaimer:
If you are not the intended recipient of this email, please notify the sender and delete it.
Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden.
Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s).
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------
begin:vcard
fn:Klaas Holwerda
n:Holwerda;Klaas
note:Unclassified
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev