Class FigSpline

  extended byjfig.objects.FigPolyline
      extended byjfig.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
Constructor Summary
FigSpline(int x0, int y0, boolean is_closed, FigAttribs attribs, FigTrafo2D trafo)
Method Summary
 FigObject copy()
          create a copy of this FigSpline.
 void createRenderer()
 java.awt.Point[] getSplinePoints()
 void rebuild()
          rebuild all internal data-structures for this polyline.
(package private)  int round(double x)
 java.lang.String toString()
          toString() for debug purposes.
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

Field Detail


java.awt.Point[] wcp_spline


static final int PPMAX
See Also:
Constant Field Values


static java.awt.Point[] pp


static int ii


static double[][] stack


static int stack_p
Constructor Detail


public FigSpline(int x0,
                 int y0,
                 boolean is_closed,
                 FigAttribs attribs,
                 FigTrafo2D trafo)
Method Detail


public void createRenderer()
createRenderer in class FigPolyline


final int round(double x)


public java.awt.Point[] getSplinePoints()


public java.lang.String toString()
Description copied from class: FigPolyline
toString() for debug purposes.

Specified by:
toString in interface FigObject
toString in class FigPolyline


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
rebuild in class FigPolyline


public FigObject copy()
create a copy of this FigSpline.

Specified by:
copy in interface FigObject
copy in class FigPolyline