Class RgbPaperType.RgbPaper

java.lang.Object
uk.ac.starlink.ttools.plot2.paper.RgbPaperType.RgbPaper
All Implemented Interfaces:
Paper
Direct Known Subclasses:
RgbPaperType2D.RgbPaper2D, RgbPaperType3D.RgbPaper3D
Enclosing class:
RgbPaperType

protected abstract static class RgbPaperType.RgbPaper extends Object implements Paper
Paper for use by this type.
  • Constructor Details

    • RgbPaper

      public RgbPaper(PaperType paperType, Rectangle bounds)
      Constructor.
      Parameters:
      paperType - paper type instance creating this paper
      bounds - plot bounds
  • Method Details

    • getPaperType

      public PaperType getPaperType()
      Description copied from interface: Paper
      Returns the PaperType which generated and can write to this paper.
      Specified by:
      getPaperType in interface Paper
      Returns:
      paper type
    • getRgbImage

      public RgbImage getRgbImage()
      Returns the RGB image that stores the state of this paper.
      Returns:
      rgb image
    • getBounds

      public Rectangle getBounds()
      Returns the plot bounds.
      Returns:
      plot bounds
    • placeDecal

      public void placeDecal(Decal decal)
      Parameters:
      decal - graphic to paint
    • getPixelIndex

      protected int getPixelIndex(int xoff, int yoff, Pixer pixer)
      Returns the index into the RGB image buffer corresponding to the current state of a pixel iterator and an X/Y offset.
      Parameters:
      xoff - offset in X
      yoff - offset in Y
      pixer - pixel iterator
      Returns:
      buffer offset for current position of pixer
    • flush

      public abstract void flush()
      Called after all drawings have been drawn.