jfig.objects
Class FigSpline
java.lang.Object
jfig.objects.FigPolyline
jfig.objects.FigSpline
- All Implemented Interfaces:
- FigDrawable, FigObject
- public class FigSpline
- extends FigPolyline
approximated (quadratic) spline objects.
Parts of the following code were translated directly from the
xfig (version 3.1.3) code of w_spline.c. That part of the code
is protected by the following copyright conditions:
FIG : Facility for Interactive Generation of figures
Copyright (c) 1985 by Supoj Sutanthavibul
Parts Copyright (c) 1994 by Brian V. Smith
Parts Copyright (c) 1991 by Paul King
Field Summary |
(package private) static int |
ii
|
(package private) static java.awt.Point[] |
pp
|
(package private) static int |
PPMAX
|
(package private) static double[][] |
stack
|
(package private) static int |
stack_p
|
(package private) java.awt.Point[] |
wcp_spline
|
Fields inherited from class jfig.objects.FigPolyline |
attribs, bbox, comment, debug, is_closed, min_i, min_num_points, painter, renderer, selected, showPoints, syncRedrawFlag, trafo, visible, wcp |
Methods inherited from class jfig.objects.FigPolyline |
appendPoint, calc_dist, canRotate, deletePoint, deselect, get_min_dist_index, get_sc_bbox, getAttributes, getBbox, getComment, getLayer, getMinDistPoint1, getMinDistPoint2, getMinPerpendicularDistance, getMinPerpendicularDistance, getMovePointNeighbors, getNearestPoint, getNeighborPoints, getObjectPainter, getPoints, getPosition, getSegmentDistance, getSyncRedrawFlag, getText, getTrafo, indexOfNearestNeighbor, initialize, insertPoint, isClosed, isSelected, isShowPoints, isVisible, isVisible, keyPressed, manhattan, message, minDistance, minDistanceEuclid, mirrorX, mirrorY, move, movePoint, nearerPoint, numPoints, paint, paint, paintSave, printCost, reset_debug, rotate, scale, select, set_debug, setArrowMode, setAttributes, setBackwardArrow, setComment, setFillColor, setFillStyle, setForwardArrow, setIsClosed, setLayer, setLineColor, setLineStyle, setLineWidth, setObjectPainter, setPoints, setSyncRedrawFlag, setText, setTrafo, setVisible, showPoints, supportsPointOps, update_bbox, update, updateAttributes, writeAsResource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
wcp_spline
java.awt.Point[] wcp_spline
PPMAX
static final int PPMAX
- See Also:
- Constant Field Values
pp
static java.awt.Point[] pp
ii
static int ii
stack
static double[][] stack
stack_p
static int stack_p
FigSpline
public FigSpline(int x0,
int y0,
boolean is_closed,
FigAttribs attribs,
FigTrafo2D trafo)
createRenderer
public void createRenderer()
- Overrides:
createRenderer
in class FigPolyline
round
final int round(double x)
getSplinePoints
public java.awt.Point[] getSplinePoints()
toString
public java.lang.String toString()
- Description copied from class:
FigPolyline
- toString() for debug purposes.
- Specified by:
toString
in interface FigObject
- Overrides:
toString
in class FigPolyline
rebuild
public void rebuild()
- Description copied from class:
FigPolyline
- rebuild all internal data-structures for this polyline.
This method re-calculates all internal data required for fast rendering
from the world-coordinate control points, attributes, and FigTrafo2D
coordinate transformation data.
Therefore, this method is computationally expensive and should only
be called when necessary.
- Specified by:
rebuild
in interface FigObject
- Overrides:
rebuild
in class FigPolyline
copy
public FigObject copy()
- create a copy of this FigSpline.
- Specified by:
copy
in interface FigObject
- Overrides:
copy
in class FigPolyline