Hi Mark,

In an ideal world we would have made TexturePaint, or at least its
createContext() method, final.  Internally it is useful for us to know
that a texture is being applied so we can use optimized code to paint
with the texture directly rather than having to call createContext() and
cause Raster objects to be created for the data.

We used to have cases in our code as well where we would do an
instanceof on TexturePaint before we ran across someone trying to
subclass it as you are doing.  We've since tried to trigger off of
comparing the paint.getClass() to TexturePaint.class so we only apply
the optimizations in the case where it is a true TexturePaint instance,
but that is less than ideal in the long run as the more specific test
does not use language optimizations and also penalizes developers who
subclass TexturePaint for reasons other than to override the
createContext() method.

I'm guessing Apply may still have a few instanceof tests in their code.
 Have you tried it on their beta version of 6 at all?

Also, out of curiousity, why are you overriding the createContext() method?

                       ...jim

Mark Stephens wrote:
We have a custom TexturePaint where we override createContext.

This is not working in Apples Java 1.5. It seems that our over-ridden
context is never called. Has anyone else seen this behaviour?

Is there a work around?

Regards,

MArk

===========================================================================
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".

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