----- Original Message -----
From: "..: cynthia bruyns ::.." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 16, 2003 8:43 AM
Subject: [JAVA2D] offScreen compositing and clipping
> can someone please post an example of how one might create a composite
> image that is a result of several images being drawn on the same canvas
> (these images may or may not overlap) and i'd like to clip the image
> generated to the device drawing region size so as not to create an
> overly large image?
>
> This is what i have so far..... but no luck:
>
> // images[] come from reading in the files
>
> int numimages = images.length;
> BufferedImage image = new BufferedImage(1024,768,imageType);
> Graphics2D imageOff = image.createGraphics();
> imageOff.setColor(Color.white);
> imageOff.fillRect(0,0,1024,768);
>
> int width = 0; int height = 0;
> for (int i=0; i<images.length; i++){
> imageOff.drawImage(images[i],width, height,this);
> width += 200; // staggering test
> }
>
> dispGc.drawImage(image,0,0,this);
> this.setAWTImage(image); // then the image gets drawn in the update
> thread, when i use a normal image file without compositing, this
> assignment of the awt image works fine
>
> this.repaint();
>
>
===========================================================================
> 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".