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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected RgbPaperType.RgbPaper
createPaper
(Rectangle bounds) Creates a paper object for given bounds.void
placeGlyph
(Paper paper, double dx, double dy, double dz, Glyph glyph, Color color) Places a glyph at a 3-d position in the space.void
placeGlyph
(Paper paper, double dx, double dy, Glyph glyph, 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 Details
-
MonoPaperType
Constructor.- Parameters:
color
- single RGB colour for all drawing (alpha component is ignored)compositor
- compositing strategy for translating alphas to displayed colours
-
-
Method Details
-
createPaper
Description copied from class:RgbPaperType
Creates a paper object for given bounds.- Specified by:
createPaper
in classRgbPaperType
- Parameters:
bounds
- plot bounds- Returns:
- new paper instance
-
placeGlyph
Description copied from interface:PaperType2D
Places a glyph at a 2-d position on the paper.- Specified by:
placeGlyph
in interfacePaperType2D
- Parameters:
paper
- graphics destination specific to this PaperTypedx
- X coordinatedy
- Y coordinateglyph
- graphics shapecolor
- colour for glyph
-
placeGlyph
Description copied from interface:PaperType3D
Places a glyph at a 3-d position in the space.- Specified by:
placeGlyph
in 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
-