Hi Saurabh
> i have never used raster, buffered image classes
> I am a bit confused - how to use createGraphics() of buffered image
Well it's very easy you define create a new bufferedImage.
Afterwards you can return a Graphics2D object by calling the method
createGraphics as you mentioned above, so this would look like this.
BufferedImage myImage = new
BufferedImage(256,256,BufferedImage.TYPE_INT_RGB)
Graphics2D myGraphics = myImage.createGraphics();
As Graphics2D extends java.awt.graphics you can use all methods graphics
provides in your case
myGraphics.setColor(Color.black);
myGraphics.fillRect(0,0,256,256);
myGraphics.setColor(Color.white);
myGraphics.drawArc(112,112,16,16,0,360);
Then you should have a white Arc nearly in the middle of your
bufferedImage. You could now do different things.
Use a raster, (with/without billboard) or use it as a texture.
For Raster you simply make following
ImageComponent2D myRasterImage = new
ImageComponent2D(ImageComponent2D.FORMAT_RGB,myImage);
Raster myRaster = new Raster(new Point3f(0,0,0),Raster.RASTER_COLOR),
0,0,256,256,myRasterImage,null);
EOF,
J.D.
--
Realtime Raytracer in JAVA
(http://www.antiflash.net/raytrace)
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".