Class PaintPolygons

java.lang.Object
org.opentrafficsim.draw.core.PaintPolygons

public final class PaintPolygons
extends java.lang.Object
Paint a (series of) filled polygon(s) defined as a Path2D.Double

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate: 2018-10-10 23:23:48 +0200 (Wed, 10 Oct 2018) $, @version $Revision: 4693 $, by $Author: averbraeck $, initial version 10 apr. 2015

Author:
Peter Knoppers
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static OTSPoint3D NEWPATH
    Dummy coordinate that forces the drawing operation to start a new path.
  • Method Summary

    Modifier and Type Method Description
    static void paintMultiPolygon​(java.awt.Graphics2D graphics, java.awt.Color color, DirectedPoint referencePoint, OTSLine3D line, boolean fill)
    Paint (fill) a polygon or a series of polygons.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NEWPATH

      public static final OTSPoint3D NEWPATH
      Dummy coordinate that forces the drawing operation to start a new path.
  • Method Details

    • paintMultiPolygon

      public static void paintMultiPolygon​(java.awt.Graphics2D graphics, java.awt.Color color, DirectedPoint referencePoint, OTSLine3D line, boolean fill)
      Paint (fill) a polygon or a series of polygons.
      Parameters:
      graphics - Graphics2D; the graphics environment
      color - Color; the color to use
      referencePoint - DirectedPoint; the reference point
      line - OTSLine3D; array of points
      fill - boolean; fill or just contour