Hi,
this indeed looks like a bug - there's even a comment
in the code to this effect (that it wouldn't work
for non-writable rasters)..
Thanks,
Dmitri
On Wed, Sep 20, 2006 at 10:35:57AM -0700, [EMAIL PROTECTED] wrote:
> I have a custom PaintContext that implements the following method:
>
> Raster getRaster(int x,
> int y,
> int w,
> int h);
>
> When it provides a Raster that is not a WritableRaster, I see the following
> exception. However, I believe I should be allowed to use just a Raster, and
> not a WritableRaster?!?
>
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
> MyGradientContext$MyRaster
> at
> sun.java2d.pipe.AlphaPaintPipe.renderPathTile(AlphaPaintPipe.java:114)
> at
> sun.java2d.pipe.DuctusShapeRenderer.renderPath(DuctusShapeRenderer.java:102)
> at
> sun.java2d.pipe.DuctusShapeRenderer.fill(DuctusShapeRenderer.java:49)
> at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:142)
> at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2258)
> [Message sent by forum member 'jvaudry' (jvaudry)]
>
> http://forums.java.net/jive/thread.jspa?messageID=155092
>
> ===========================================================================
> 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".