Class 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 Detail

      • SortedPaperType3D

        public SortedPaperType3D()
        Constructor.
    • Method Detail

      • createPaper

        protected Paper createPaper​(java.awt.Graphics g,
                                    java.awt.Rectangle bounds)
        Description copied from class: PaintPaperType
        Creates a paper instance for use with this PaperType.
        Specified by:
        createPaper in class PaintPaperType
        Parameters:
        g - graphics context to which paper should output
        bounds - 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: 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 PaperType
        dx - graphics X coordinate
        dy - graphics Y coordinate
        dz - Z-buffer coordinate; lower values are closer to the viewer
        glyph - graphics shape
        color - colour for glyph
      • placeDecal

        public void placeDecal​(Paper paper,
                               Decal decal)
        Description copied from interface: PaperType
        Paints a Decal onto a given paper object.
        Specified by:
        placeDecal in interface PaperType
        Parameters:
        paper - graphics destination, of appropriate type for this object
        decal - graphic to paint
      • flushPaper

        protected void flushPaper​(Paper paper)
        Description copied from class: PaintPaperType
        Called when all the layers have been painted.
        Specified by:
        flushPaper in class PaintPaperType
        Parameters:
        paper - graphics destination