On Wed, Oct 29, 2008 at 3:55 AM, Klaas Holwerda
<[EMAIL PROTECTED]> wrote:
> I did not write several parts of this myself. a2fFont is mainly written by
> someone else.
> So i agree that the next is a bit confusing.
> So indeed thing like:
>
> enum a2dFontAlignment
> {
>        a2dALIGN_LEFT
>        a2dALIGN_RIGHT
>        a2dALIGN_VERTICAL_CENTER
>        a2dALIGN_VERTICAL_BASELINE
>        a2dALIGN_VERTICAL_BOTTOM
>        a2dALIGN_VERTICAL_TOP
>        a2dALIGN_HORIZONTAL_CENTER
>        a2dALIGN_BBOX
> }
>
> would be better. Or whatever is more close to SVG would be oke also.

I think so too, and we can just set them equal to the wxXXXX variants
as well, to maintain backwards compatibility.


> But functions like this need to understand it too, so not that easy.
>
> ic.GetDrawer2D()->DrawText( left, x, y + line * up * (GetLineHeight() +
> m_linespace), m_alignment, !GetDrawFrame() && GetBackGround() );
>
> m_font.GetTextExtent( left, ic.GetDrawer2D()->GetYaxis(),
> wxLEFT|wxTOP|wxBBOX, &w );
>
> It seems that the alignment is towards a line of text and how it is
> positioned relative to the a2dText position. The rest of the lines follow
> from that.
> I wonder if SVG thinks like that, or in multiple text lines alignment??

SVG actually doesn't allow multi-line text except with explicit
additional lines (i.e. no word wrap), so each could actually be a
separate text entity, positioned separately.  Writing out the SVG will
be a lot easier than reading it in.

I've made some major modifications to the SVG rendering for both the
text and the splines.  They both now replicate exactly the output of
wxArt2D. In the case of the splines, it uses vector splines instead of
polylines, which looks quite good.  I've also made it so the font
family, style, alignment, etc. are correctly outputted to the SVG.
Here are some screenshot comparisons:

Application:

http://img231.imageshack.us/my.php?image=20081029035715sb1.png

SVG output:

http://img231.imageshack.us/my.php?image=20081029035658cu6.png

I'll add them once I get CVS access.

-------------------------------------------------------------------------
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

Reply via email to