Class SortedPaperType3D
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.paper.PaintPaperType
-
- uk.ac.starlink.ttools.plot2.paper.SortedPaperType3D
-
- All Implemented Interfaces:
PaperType,PaperType3D
public class SortedPaperType3D extends PaintPaperType implements PaperType3D
PaintPaperType for 3-dimensional plots. Suitable for output to vector graphics media.It works by accumulating a list of glyphs to be painted, and when they are all in (all layer drawings have been processed) sorts them by Z-coordinate and paints them in order. I think that's the only way you can do it for vector graphics. It will unavoidably have a large memory footprint and be slow for large numbers of points.
- Since:
- 14 Feb 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SortedPaperType3D()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PapercreatePaper(java.awt.Graphics g, java.awt.Rectangle bounds)Creates a paper instance for use with this PaperType.protected voidflushPaper(Paper paper)Called when all the layers have been painted.voidplaceDecal(Paper paper, Decal decal)Paints a Decal onto a given paper object.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.-
Methods inherited from class uk.ac.starlink.ttools.plot2.paper.PaintPaperType
createDataIcon, createHeadlessGraphicsConfig, isBitmap, 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
-
-
-
-
Method Detail
-
createPaper
protected Paper createPaper(java.awt.Graphics g, java.awt.Rectangle bounds)
Description copied from class:PaintPaperTypeCreates a paper instance for use with this PaperType.- Specified by:
createPaperin classPaintPaperType- Parameters:
g- graphics context to which paper should outputbounds- plot bounds- Returns:
- new paper instance
-
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
-
placeDecal
public void placeDecal(Paper paper, Decal decal)
Description copied from interface:PaperTypePaints a Decal onto a given paper object.- Specified by:
placeDecalin interfacePaperType- Parameters:
paper- graphics destination, of appropriate type for this objectdecal- graphic to paint
-
flushPaper
protected void flushPaper(Paper paper)
Description copied from class:PaintPaperTypeCalled when all the layers have been painted.- Specified by:
flushPaperin classPaintPaperType- Parameters:
paper- graphics destination
-
-