uk.ac.starlink.diva
Class DrawPolygonFigure
java.lang.Object
diva.canvas.AbstractFigure
diva.canvas.toolbox.BasicFigure
uk.ac.starlink.diva.DrawBasicFigure
uk.ac.starlink.diva.DrawPolygonFigure
- All Implemented Interfaces:
- CanvasComponent, Figure, ShapedFigure, VisibleComponent, UserObjectContainer, DrawFigure
public class DrawPolygonFigure
- extends DrawBasicFigure
A figure that displays a polyline that can have its vertices moved.
- Version:
- $Id$
- Author:
- Peter W. Draper
- See Also:
DrawBasicFigure
Constructor Summary |
DrawPolygonFigure(double x,
double y,
Paint fill,
float lineWidth)
Create a new polyline with the given origin, colour and linewidth. |
DrawPolygonFigure(double x,
double y,
Paint fill,
Paint outline,
float lineWidth,
AlphaComposite composite)
Create a new polygon with the given origin and colour. |
DrawPolygonFigure(Polygon2D poly)
Create a new polygon using the given polygon shape. |
DrawPolygonFigure(Polygon2D poly,
Paint fill,
Paint outline,
float lineWidth,
AlphaComposite composite)
Create a new polygon using the given polygon shape, colour,
fill and linewidth. |
Methods inherited from class diva.canvas.toolbox.BasicFigure |
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getShape, getStrokePaint, hit, paint, setComposite, setDashArray, setFillPaint, setLineWidth, setShape, setStroke, setStrokePaint |
Methods inherited from class diva.canvas.AbstractFigure |
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diva.canvas.Figure |
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText |
polygon
protected Polygon2D.Double polygon
- The Polygon that we're using.
DrawPolygonFigure
public DrawPolygonFigure(Polygon2D poly)
- Create a new polygon using the given polygon shape.
This has unit-width continuous stroke and no paint pattern.
DrawPolygonFigure
public DrawPolygonFigure(Polygon2D poly,
Paint fill,
Paint outline,
float lineWidth,
AlphaComposite composite)
- Create a new polygon using the given polygon shape, colour,
fill and linewidth.
DrawPolygonFigure
public DrawPolygonFigure(double x,
double y,
Paint fill,
Paint outline,
float lineWidth,
AlphaComposite composite)
- Create a new polygon with the given origin and colour.
DrawPolygonFigure
public DrawPolygonFigure(double x,
double y,
Paint fill,
float lineWidth)
- Create a new polyline with the given origin, colour and linewidth.
createPolygon
public Polygon2D.Double createPolygon(double x,
double y)
- Create a polygon and position it at the origin.
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.