Figures
Package:
diva.canvas.figures
Status:
0.1. Very preliminary. Published to ptdesign. 05/05/98.
Last updated:
May 5th, 1998.
See also:
The Diva canvas
Copyright
Contents
Overview
This package contains a number of pre-defined concrete figures.
Figures in this package are those considered to be likely to be useful
in a large number of situations.
Note that there are no predefined figures for simple shapes
like rectangle and simple line segments, since these are easily
created as an instance of SimpleFigure. For example,
fig = new SimpleFigure( new Rectangle(50, 50, 100, 100) );
Interfaces
- interface Arrowed
-
An interface supported by lines that support arrows on one
or both ends.
- void setArrowFirst ( Shape )
- Set the shape of the arrow to be drawn at the start of this line.
- void setArrowLast ( Shape )
- Set the shape of the arrow to be drawn at the end of this line.
Classes
- class Arrow
-
A class that produces useful shapes for arrowheads. All
shapes are such that the arrow points east.
- static Shape triangle ( float )
- Get a triangular arrowhead of the specified length.
- static Shape winged ( float, float, float )
- Get a triangular arrowhead, where the three arguments
are the length of the arrowhead along the stem, the horizontal
distance from the stem to the rear point, and the vertical
distance from the stem to the rear point.
- class ArrowedLine extends LeafFigure implements StrokedFigure, Arrowed
-
A figure class that draws arrowed lines.
The default stroke is a solid unit-width stroke, and the
default fill is solid black.
- ArrowedLine ( Line2D )
- Create an arrowed line from the given line, with the default
arrowhead at the "end" of the line.
- ArrowedLine ( Line2D, Shape, Shape )
- Create an arrowed line from the given line, with the given
shapes used as arrowheads as the "start" and "end" of the line.
Either of these can be null.
- ArrowedLine ( GeneralPath )
- Create an arrowed line from the given path, with the default
arrowhead at the "end" of the line.
- ArrowedLine ( GeneralPath, Shape, Shape)
- Create an arrowed line from the given path, with the given
shapes used as arrowheads as the "start" and "end" of the line.
Either of these can be null.
- GeneralPath getPath ( )
- Get the general path of this arrowed line. If the line was
created with a Line2D object, convert it to a general path
first.
- void setPath ( GeneralPath )
- Change the path of this arrowed line to the given path.