[EMAIL PROTECTED] wrote:
> Hi Gary,
> 
> > The setComposite method of anything that extends java.awt.
> > Graphics2D is supposed to do a permisson check if "...this
> > Graphics2D context is drawing to a Component on the display
> > screen and the Composite is a custom object rather than an
> > instance of the AlphaComposite class."  The latter is easy
> > to check, but how do I tell whether the context is drawing
> > to a Component on the display screen?
> 
> Only one subclass of CairoGraphics2D draws on the screen, I
> think this is ComponentGraphics.

Ok.  Do you know about its subclass, VolatileImageGraphics?

> However, I am not sure if we need to check this really (at least as
> things are now). The point of this check is that custom Composite
> objects don't get access to the pixel data on the screen, if they
> aren't allowed to. This is possible by doing operations with the
> CompositeContext of the Composite object. As it is implemented now,
> we only support AlphaComposite anyway (no need to check for this I
> think), and don't do anything with the CompositeContext, but instead
> let Cairo handle this (more efficiently I hope).

Yeah, I saw all the FIXMEs :) But I'd like to put the checks
in anyway, even if all that happens after the check is that an
UnsupportedOperationException is thrown.  That way I can write
Mauve tests and stuff.

Cheers,
Gary

Reply via email to