uk.ac.starlink.ttools.plot2.paper
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
MonoPaperType
public MonoPaperType(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
createPaper
protected RgbPaperType.RgbPaper createPaper(Rectangle bounds)
- Description copied from class:
RgbPaperType
- Creates a paper object for given bounds.
- Specified by:
createPaper
in class RgbPaperType
- Parameters:
bounds
- plot bounds
- Returns:
- new paper instance
placeGlyph
public void placeGlyph(Paper paper,
double dx,
double dy,
Glyph glyph,
Color color)
- Description copied from interface:
PaperType2D
- Places a glyph at a 2-d position on the paper.
- Specified by:
placeGlyph
in interface PaperType2D
- 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,
Color color)
- Description copied from interface:
PaperType3D
- Places a glyph at a 3-d position in the space.
- Specified by:
placeGlyph
in interface PaperType3D
- 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
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.