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 Bill Haneman <Bi...@ireland.sun.com> on 2000/12/13 18:32:57 UTC

[commit] Change to method signature TextPainter.getHighlightShape()

Changed TextPainter.getHighlightShape to return a shape in user coords,
not "layout coords."  

CVS: Committing in .
CVS:
CVS: Modified Files:
CVS:    sources/org/apache/batik/gvt/TextPainter.java
CVS:    sources/org/apache/batik/refimpl/gvt/ConcreteTextNode.java
CVS:    
sources/org/apache/batik/refimpl/gvt/renderer/BasicTextPainter.java
CVS:


------
Bill Haneman +353 1 8199279
Ireland Desktop Engineering
Sun Microsystems Ireland Ltd.


pending commit: GraphicsNodeRenderContext param in geom methods

Posted by Bill Haneman <bi...@ireland.sun.com>.
Hi :

You may remember from the hackathon, or from reading source comments,
that
we are currently using a hack in TextNode geometric methods in order to
determine the node bounds.  We agreed then to add
GraphicsNodeRenderContext
to the geometric method parameter list, but deferred the change.

Now's the time :-)

This is a trivial change in some ways, but many files are affected.
It also means that we pass GNRC to all GraphicsNode geometry calls,
which
perhaps will have some (hopefully small) performance impact.  However,
since text nodes can only know their geometry after being laid out,
which
depends on the GraphicsNodeRenderContext (from which we get
FontRenderContext
and TextPainter), this is a necessary change.  Furthermore, we can't
cache GraphicsNodeRenderContext in the GraphicsNodes since nodes can
have multiple render contexts (for instance, when you are viewing a
document and decide to print it).

Thierry and Stephane, there are some bridge files affected.  There are
no
logic changes, only one added parameter in some method calls and
signatures.

The current hack means that text nodes are dependant on
java.awt.font.TextLayout,
it is not appropriate for transcoding renderers, or, more importantly,
for
extensions of TextPainter/TextLayout which are required for many text
features that are currently missing.  So it's a good thing :-)

I hope to have the conversion done in my own codebase today, regression
test it,
and then commit.  But if someone else has a big commit today, either
I would request that they wait and do an update, or else I can merge my
changes later (probably not tomorrow, it could delay this into next
week).

-Bill
 
--------------
Bill Haneman
+1 353 1 849 0495