jfig.objects
Class FigGeneralXSpline

java.lang.Object
  extended byjfig.objects.FigPolyline
      extended byjfig.objects.FigXSpline
          extended byjfig.objects.FigGeneralXSpline
All Implemented Interfaces:
FigDrawable, FigObject

public class FigGeneralXSpline
extends FigXSpline

a simple subclass of the generic FigXSpline which allows arbitrary control point scalefactors.


Field Summary
 
Fields inherited from class jfig.objects.FigXSpline
sfactors, 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
FigGeneralXSpline(int x0, int y0, boolean is_closed, FigAttribs attribs, FigTrafo2D trafo)
           
FigGeneralXSpline(int x0, int y0, FigAttribs attribs, FigTrafo2D trafo)
           
 
Method Summary
 FigObject copy()
          build a copy of this FigXSpline.
 void createSfactors()
          default method to create the interpolation control sfactors.
 java.awt.Point deletePoint(java.awt.Point wp)
          delete a Point wp from this polyline.
 void insertPoint(java.awt.Point wp, java.awt.Point wprev)
          insert a Point wp after Point wprev into the Point array.
 void rebuild()
          rebuild all internal data-structures for this polyline.
 
Methods inherited from class jfig.objects.FigXSpline
createRenderer, dumpSfactors, dumpXsplinePoints, getSFactors, getSplinePoints, setSFactors, toString
 
Methods inherited from class jfig.objects.FigPolyline
appendPoint, calc_dist, canRotate, 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, 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
 

Constructor Detail

FigGeneralXSpline

public FigGeneralXSpline(int x0,
                         int y0,
                         FigAttribs attribs,
                         FigTrafo2D trafo)

FigGeneralXSpline

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

createSfactors

public void createSfactors()
Description copied from class: FigXSpline
default method to create the interpolation control sfactors. We use 1.0 (approximated) everywhere except for the end points.

Overrides:
createSfactors in class FigXSpline

copy

public FigObject copy()
Description copied from class: FigXSpline
build a copy of this FigXSpline.

Specified by:
copy in interface FigObject
Overrides:
copy in class FigXSpline

insertPoint

public void insertPoint(java.awt.Point wp,
                        java.awt.Point wprev)
insert a Point wp after Point wprev into the Point array. We also update our sfactors (spline control parameters) array.

Specified by:
insertPoint in interface FigObject
Overrides:
insertPoint in class FigPolyline

deletePoint

public java.awt.Point deletePoint(java.awt.Point wp)
delete a Point wp from this polyline. This function returns the index of the predecessor of the deleted point, and null for the first point. We also update our sfactors (spline control parameters) array.

Specified by:
deletePoint in interface FigObject
Overrides:
deletePoint 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 FigXSpline