uk.ac.starlink.diva
Class DrawFreehandFigure
java.lang.Object
diva.canvas.AbstractFigure
diva.canvas.toolbox.PathFigure
uk.ac.starlink.diva.DrawPathFigure
uk.ac.starlink.diva.DrawFreehandFigure
- All Implemented Interfaces:
- CanvasComponent, Figure, ShapedFigure, VisibleComponent, UserObjectContainer, DrawFigure
public class DrawFreehandFigure
- extends DrawPathFigure
A figure that displays a polyline that can have its vertices moved,
intended for use as a freehand (i.e. many vertices) figure, same as
Polyline figure but can be identified as needing different treatment.
- Version:
- $Id$
- Author:
- Peter W. Draper
- See Also:
DrawPathFigure
Constructor Summary |
DrawFreehandFigure(double x,
double y,
Paint fill)
Create a new polyline with the given origin and colour. |
DrawFreehandFigure(double x,
double y,
Paint fill,
float lineWidth,
AlphaComposite composite)
Create a new rectangle with the given origin, colour and linewidth. |
DrawFreehandFigure(Polyline2D poly)
Create a new polyline using the given polyline shape. |
DrawFreehandFigure(Polyline2D poly,
Paint fill,
float lineWidth,
AlphaComposite composite)
Create a new polyline using the given polyline shape, colour
and linewidth. |
Methods inherited from class uk.ac.starlink.diva.DrawPathFigure |
addListener, fireChanged, fireCreated, fireRemoved, getFillPaint, isTransformFreely, removeListener, setFillPaint, setTransformFreely, setVisible, transform, translate |
Methods inherited from class diva.canvas.toolbox.PathFigure |
getBounds, getComposite, getDashArray, getLineWidth, getShape, getStroke, getStrokePaint, hit, paint, setComposite, setDashArray, 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 |
polyline
protected Polyline2D.Double polyline
- The Polyline that we're using.
DrawFreehandFigure
public DrawFreehandFigure(Polyline2D poly)
- Create a new polyline using the given polyline shape.
This has unit-width continuous stroke and no paint pattern.
DrawFreehandFigure
public DrawFreehandFigure(Polyline2D poly,
Paint fill,
float lineWidth,
AlphaComposite composite)
- Create a new polyline using the given polyline shape, colour
and linewidth.
DrawFreehandFigure
public DrawFreehandFigure(double x,
double y,
Paint fill)
- Create a new polyline with the given origin and colour.
DrawFreehandFigure
public DrawFreehandFigure(double x,
double y,
Paint fill,
float lineWidth,
AlphaComposite composite)
- Create a new rectangle with the given origin, colour and linewidth.
createFreehand
public Polyline2D.Double createFreehand(double x,
double y)
- Create a polyline and position it at the origin.
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.