Hi David,

  You can get pixel by pixel access using SampleModel's methods
  setPixel/setSample which allow to set a pixel at certain
  location. Use getSampleModel() method of
  BufferedImage to obtain a sample model.

  Another way is to use WritableRaster's methods
  setPixel[s]/setSample[s].
  There is also setRect(Raster) method which allows to set a
  rectangle of the original raster with another provided raster.
  Use BufferedImage.getRaster() to get a writable raster.

  However, pixel by pixel access could be very slow..

  Did you consider using Java3D API for your purposes? Take a
  look:
  http://java.sun.com/products/java-media/3D/index.html

  Thank you,
    Dmitri


On Wed, Aug 09, 2000 at 10:16:0p +0200, David Ward wrote:
 > Hi everyone
 >
 > I'm writing a simple 3D program and need some help with drawing to a
 > bufferedImage . I know very little about how to draw using
 > rasters/sampleModels etc , so was wondering if anyone could help me with
 > the basics of say , how to write a pixel onto a bufferedImage object at a
 > certain position , as i need to draw polygons at a pixel at a time . So if
 > anyone could give me a basic hint or a link to a website I'd be very
 > gratefull , thanks in advance ,
 >
 > Jonathan Ward
 >
 > ===========================================================================
 > 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