You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Vincent Hardy <vi...@eng.sun.com> on 2000/11/01 08:01:18 UTC

Gradient and Text

Ok, so I found why we do not pass the BE on text. Currently, the 
TextPainter is invoked after the transform has been modified in 
the TextNode's primitivePaint method. The net result is that the Paint
and the ACI are in different spaces which causes the problem. There 
is an easy way to correct this: the TextPainter should also be
passed the location at which the text should be drawn and use this
to paint the text at the appropriate location. This will keep the 
text and paint attributes in the same space and solve the problem.
It is quite late, so I am not going to do this just now, but I will
do it tomorow, unless someone objects.
Thanks.
V.

Vincent Hardy wrote:
> 
> Hello,
> 
> I just commited a couple things:
> 
> a. Linear and Radial Gradients. This turned out to require some new
>    code to get the proper behavior on bounding box. Now, we pass the
>    BE tests on linear and gradient paints.
> 
> b. SVGTextElementBridge. I added initial loading of all system font
>    (i.e., putting font-family names into the font map) so that all
>    system fonts can now be used.
> 
> There is still something I do not understand in the text area. At small
> font sizes, the layout is screwed up (and does not look good). I first
> thought it was related to fractional metrics not being set (they are
> now), but the problem persists. It does not seem to be coming from the
> new font-size conversion routines... Any suggestions?
> Thanks.
> V.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org