Class DrawingGlyph

  • All Implemented Interfaces:
    Glyph
    Direct Known Subclasses:
    LineGlyph

    public abstract class DrawingGlyph
    extends java.lang.Object
    implements Glyph
    Abstract Glyph subclass that uses a PixelDrawing.
    Since:
    7 Oct 2021
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      DrawingGlyph()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      Pixer createPixer​(java.awt.Rectangle clip)
      Returns an iterator over pixel offsets for this glyph's shape, considered to be at the origin.
      abstract PixelDrawing createPixerFactory​(java.awt.Rectangle clip)
      Returns a drawing that can dispense pixers for this glyph.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface uk.ac.starlink.ttools.plot2.Glyph

        paintGlyph
    • Constructor Detail

      • DrawingGlyph

        public DrawingGlyph()
    • Method Detail

      • createPixerFactory

        public abstract PixelDrawing createPixerFactory​(java.awt.Rectangle clip)
        Returns a drawing that can dispense pixers for this glyph.
        Parameters:
        clip - clip shape
      • createPixer

        public final Pixer createPixer​(java.awt.Rectangle clip)
        Description copied from interface: Glyph
        Returns an iterator over pixel offsets for this glyph's shape, considered to be at the origin. Typically this means the pixel collection is centred at that point. The returned iterator must not include any points outside of the given clip rectangle. A null return indicates that no pixels fall within the given clip.
        Specified by:
        createPixer in interface Glyph
        Parameters:
        clip - clip rectangle
        Returns:
        pixel iterator for the intersection of this glyph's shape and the given clip, or null for no pixels