Class PrototypingGraphics2D


  • public final class PrototypingGraphics2D
    extends AbstractGraphics2DAdapter
    A graphics context that selectively renders different classes of content for speed or prototyping purposes. For example, it could be set to draw only text to save the ink that would be spent printing background graphics.
    Author:
    Chris Jennings
    • Constructor Detail

      • PrototypingGraphics2D

        public PrototypingGraphics2D​(java.awt.Graphics2D unrestrictedGraphics)
        Creates a new prototyping graphics context with default options: text and shapes are drawn, but images are not.
        Parameters:
        unrestrictedGraphics - a graphics context to modify
      • PrototypingGraphics2D

        public PrototypingGraphics2D​(java.awt.Graphics2D unrestrictedGraphics,
                                     boolean drawText,
                                     boolean drawImages,
                                     boolean strokeShapes,
                                     boolean fillShapes,
                                     boolean clearRects)
        Creates a new prototyping graphics context that selectively renders the specified elements.
        Parameters:
        unrestrictedGraphics - a graphics context to modify
        drawText - if true, regular text is rendered
        drawImages - if true, bitmap images are rendered
        strokeShapes - if true, lines, polygons, and shape outlines are drawn
        fillShapes - if true, polygons and other shapes are filled
        clearRects - if true, regions are cleared when clearRect(int, int, int, int) is called