Hi Mark,

[EMAIL PROTECTED] wrote:
Also, out of curiousity, why are you overriding the createContext() method?

We use a custom PaintContext in our PDF renderer to handle
PatternColorspaces where the Pattern is also rotated or inverted.
In PatternColorspaces a single titled image is drawn again and again
to fill an area. Because the pattern needs to overlap and repeat
correctly when rotated, you can not just use a standard TextPaint to
just repeatedly draw it as it will not line up.

I didn't thoroughly follow the description you give here, it sounds like
a description of the TexturePaint object itself.  In particular, the
TexturePaint is capable of tiling images in a rotated or otherwise
transformed coordinate space so I don't see where the differences are.

Our custom PaintContext creates a single image and works out the
tiling repeat offsets so it is drawn correctly.

In any case you seem to be describing a situation where the TexturePaint
doesn't perform the operation you need it to perform.  Fair enough,
TexturePaint may not meet everyone's needs.  That is why it is just one
implementation of a general interface.

When we started to debug it on the Apple, our TexturePaint is
instanced as we would expect, but createContext is never called.

The question then becomes, why are you creating a Paint implementation
by subclassing TexturePaint rather than simply implementing the Paint
interface directly in an unrelated class?  Since there is only 1 method
in the Paint interface, you could simply change your class from "extends
TexturePaint" to "implements Paint" and you should be set, no?

                               ...jim

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to