Class MonoPaperType
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.paper.RgbPaperType
-
- uk.ac.starlink.ttools.plot2.paper.MonoPaperType
-
- All Implemented Interfaces:
PaperType,PaperType2D,PaperType3D
public class MonoPaperType extends RgbPaperType implements PaperType2D, PaperType3D
Bitmapped PaperType which can paint transparent or opaque pixels as long as they are all the same colour. That means all painted glyphs and decals must have the same RGB (as specified at construction time), though they may have different alphas.Since the compositing is pretty much the same (no attention needs to be paid to the depth coordinate) this class implements both the 2D and 3D PaperType interfaces.
- Since:
- 14 Feb 2013
- Author:
- Mark Taylor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class uk.ac.starlink.ttools.plot2.paper.RgbPaperType
RgbPaperType.RgbPaper
-
-
Constructor Summary
Constructors Constructor Description MonoPaperType(java.awt.Color color, Compositor compositor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RgbPaperType.RgbPapercreatePaper(java.awt.Rectangle bounds)Creates a paper object for given bounds.voidplaceGlyph(Paper paper, double dx, double dy, double dz, Glyph glyph, java.awt.Color color)Places a glyph at a 3-d position in the space.voidplaceGlyph(Paper paper, double dx, double dy, Glyph glyph, java.awt.Color color)Places a glyph at a 2-d position on the paper.-
Methods inherited from class uk.ac.starlink.ttools.plot2.paper.RgbPaperType
createDataIcon, isBitmap, placeDecal, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface uk.ac.starlink.ttools.plot2.paper.PaperType
createDataIcon, isBitmap, placeDecal
-
-
-
-
Constructor Detail
-
MonoPaperType
public MonoPaperType(java.awt.Color color, Compositor compositor)Constructor.- Parameters:
color- single RGB colour for all drawing (alpha component is ignored)compositor- compositing strategy for translating alphas to displayed colours
-
-
Method Detail
-
createPaper
protected RgbPaperType.RgbPaper createPaper(java.awt.Rectangle bounds)
Description copied from class:RgbPaperTypeCreates a paper object for given bounds.- Specified by:
createPaperin classRgbPaperType- Parameters:
bounds- plot bounds- Returns:
- new paper instance
-
placeGlyph
public void placeGlyph(Paper paper, double dx, double dy, Glyph glyph, java.awt.Color color)
Description copied from interface:PaperType2DPlaces a glyph at a 2-d position on the paper.- Specified by:
placeGlyphin interfacePaperType2D- Parameters:
paper- graphics destination specific to this PaperTypedx- X coordinatedy- Y coordinateglyph- graphics shapecolor- colour for glyph
-
placeGlyph
public void placeGlyph(Paper paper, double dx, double dy, double dz, Glyph glyph, java.awt.Color color)
Description copied from interface:PaperType3DPlaces a glyph at a 3-d position in the space.- Specified by:
placeGlyphin interfacePaperType3D- Parameters:
paper- graphics destination specific to this PaperTypedx- graphics X coordinatedy- graphics Y coordinatedz- Z-buffer coordinate; lower values are closer to the viewerglyph- graphics shapecolor- colour for glyph
-
-