jfig.objects
Class FigPolyline

java.lang.Object
  extended byjfig.objects.FigPolyline
All Implemented Interfaces:
FigDrawable, FigObject
Direct Known Subclasses:
ClockArm, ErrorMarker, FigArc, FigBezier, FigSpline, FigXSpline, Polyline, WireSegment

public class FigPolyline
extends java.lang.Object
implements FigObject

n-points polyline object.

FigPolyline provides the basic FIG polyline objects for jfig. It supports all xfig line-styles and attributes, including front and back arrows. The actual rendering is deferred to either AWT 1.1 or Java2D based subclasses.

This class also serves as a base class for the FIG spline objects.


Field Summary
protected  FigAttribs attribs
           
protected  FigBbox bbox
           
protected  java.lang.String comment
           
protected  boolean debug
           
protected  boolean is_closed
           
protected  int min_i
           
protected  int min_num_points
           
protected  ObjectPainter painter
           
protected  FigRenderer renderer
           
protected  boolean selected
           
protected  boolean showPoints
           
protected  boolean syncRedrawFlag
           
protected  FigTrafo2D trafo
           
protected  boolean visible
           
protected  java.awt.Point[] wcp
           
 
Constructor Summary
FigPolyline()
          default constructor: a polyline with default attributes at (0,0) Default drawing Color is black, no fill.
FigPolyline(int x0, int y0, boolean is_closed, FigAttribs _attribs, FigTrafo2D trafo)
          Constructor with attributes, transformation, and first polyline vertex
 
Method Summary
 void appendPoint(java.awt.Point p)
          append a point (given in world-coordinates) to this polyline.
 double calc_dist(java.awt.Point P)
          get the minimum euclidean distance of Point p to any line segment of this polyline.
 boolean canRotate(double angle_in_rad)
          returns true: it is always possible to rotate a polyline.
 FigObject copy()
          build a copy of this FigPolyline.
 void createRenderer()
           
 java.awt.Point deletePoint(java.awt.Point wp)
          delete a Point wp from this polyline.
 void deselect()
          mehtod stub for the deselect() mehtod
 int get_min_dist_index(java.awt.Point P)
          get the index of the minimum distance line segment from Point P to this polyline.
 FigBbox get_sc_bbox()
          calculate the current screen-coordinates bounding box
 FigAttribs getAttributes()
          get object attributes
 FigBbox getBbox()
          return the world-coordinates bounding box of this polyline.
 java.lang.String getComment()
          get the comment for this object (may be null).
 int getLayer()
          get layer (depth)
 java.awt.Point getMinDistPoint1()
           
 java.awt.Point getMinDistPoint2()
           
 double getMinPerpendicularDistance(java.awt.Point P)
          calculate the minimum distance of Point P to the nearest segment of this polyline.
 double getMinPerpendicularDistance(java.awt.Point P, java.awt.Point w1, java.awt.Point w2)
          calculate the minimum distance of Point P to the nearest segment of this polyline.
 java.awt.Point[] getMovePointNeighbors(java.awt.Point wp)
          getMovePointNeighbors(): Find the Point wcp[i] nearest to wp on this polyline.
 java.awt.Point getNearestPoint(java.awt.Point target)
          return the point of this object nearest to Point wp, if any.
 java.awt.Point[] getNeighborPoints(java.awt.Point wp)
          getNeighborPoints(): find the previous and next neighbor Points for Point wp on this polyline.
 ObjectPainter getObjectPainter()
           
 java.awt.Point[] getPoints()
          return Point array (world coords)
 java.awt.Point getPosition()
          return the base point of this polyline.
protected  double getSegmentDistance(java.awt.Point P, java.awt.Point Q, java.awt.Point wp)
          getSegmentDistance(): calculate the minimum distance of Point WP from the line segment from P to Q.
 boolean getSyncRedrawFlag()
          is a sync redraw pending on this object?
 java.lang.String getText()
          get the object's text, if any
 FigTrafo2D getTrafo()
          get transformation
 int indexOfNearestNeighbor(java.awt.Point wp)
           
 boolean initialize(java.lang.String s)
           
 void insertPoint(java.awt.Point wp, java.awt.Point wprev)
          insert a Point wp after Point wprev into the Point array.
 boolean isClosed()
          Is this polyline closed?
 boolean isSelected()
          get current selection status
 boolean isShowPoints()
           
 boolean isVisible()
           
 boolean isVisible(FigBbox viewport)
          is this object visible within the given FigBbox?
 void keyPressed(java.awt.event.KeyEvent event)
          react to a key event (e.g.
 int manhattan(java.awt.Point p, java.awt.Point q)
           
 void message(java.lang.String s)
           
 double minDistance(java.awt.Point wp)
          return the minimum distance of the polyline to the reference point wp.
 double minDistanceEuclid(java.awt.Point wp)
          return the minimal euclidean distance from point wp to the nearest segment of this polyline.
 void mirrorX(int mirror_x, int mirror_y)
          simple implementation of mirrorX():
 void mirrorY(int mirror_x, int mirror_y)
          simple implementation of mirrorY():
 void move(int dx, int dy)
          method stub for the move() method
 void movePoint(java.awt.Point wp, java.awt.Point wpnew)
          move a point from position wp to wpnew.
protected  java.awt.Point nearerPoint(java.awt.Point P1, java.awt.Point P2, java.awt.Point W)
          nearerPoint(): Check whether wp is nearer to P1 than P2.
 int numPoints()
          get number of Points in this object
 void paint(java.awt.Graphics g)
          paint this polyline using either AWT 1.1 or Java2D
 void paint(java.awt.Graphics g, FigTrafo2D trafo)
          paint this object using the specified transformation and Graphics g
 void paintSave(java.awt.Graphics g, FigTrafo2D trafo)
           
protected  void printCost(int i, double cost, double min_cost)
          printCost(): help debugging the segment cost functions.
 void rebuild()
          rebuild all internal data-structures for this polyline.
 void reset_debug()
          reset debug flag
 void rotate(java.awt.Point anchor, double angle_in_rad)
          method stub for rotate() - allow for Exceptions if the object doesn't support the specified angle.
 void scale(java.awt.Point origin, double factor_x, double factor_y)
          scale the polyline.
 void select()
          method stub for the select() method.
 void set_debug()
          set debug flag
 void setArrowMode(int _mode)
          set a new arrow mode for this polyline; possible values are FigAttribs.NO_ARROW, FORWARD_ARROW, BACKWARD_ARROW, DOUBLE_ARROW.
 void setAttributes(FigAttribs attributes)
           
 void setBackwardArrow(int type, double width, double length, double linewidth)
          set the type and width, length, linewidth for the backward arrow of this polyline.
 void setComment(java.lang.String s)
          set a comment for this object.
 void setFillColor(java.awt.Color c)
          set a new fill color
 void setFillStyle(int shade_or_pattern)
          set the fill style to one of the predefined FIG values, where -1 implies NO_FILL, a value between 0..40 selects the corresponding shade/tint, and values >= 41 select one of the FIG fill patterns.
 void setForwardArrow(int type, double width, double length, double linewidth)
          set the type (FigAttribs.SIMPLE_ARROW, TRIANGLE_ARROW, ...) and arrow heads width, length, and linewidth for the forward arrow of this polyline.
 void setIsClosed(boolean b)
           
 void setLayer(int _layer)
          set the layer (depth) for this polyline; the FIG format allows values in the range [1..1000] with 1 being the topmost layer.
 void setLineColor(java.awt.Color c)
          set a new line color
 void setLineStyle(int fig_line_style)
          set the line style to one of the predefined FIG styles, e.g.
 void setLineWidth(int fig_line_width)
          set the line width to one of the predefined FIG widths, e.g.
 void setObjectPainter(ObjectPainter painter)
           
 void setPoints(java.awt.Point[] wcp)
          set a new array of world-coordinate Points for this polyline.
 void setSyncRedrawFlag(boolean b)
          set or reset whether this objects needs a sync redraw
 void setText(java.lang.String s)
          set the object's text
 void setTrafo(FigTrafo2D trafo)
          set a new transformation.
 void setVisible(boolean b)
           
 void showPoints()
          method stub for the showPoints() method.
 boolean supportsPointOps()
          FigPolyline supports the Point insert/append/delete/...
 java.lang.String toString()
          toString() for debug purposes.
 void update_bbox()
          build the polyline bounding box from the world-coordinate points.
 void update(FigAttribs new_attribs)
          update the attributes for this polyline.
 void updateAttributes(java.lang.String s)
           
 void writeAsResource(java.io.PrintWriter writer)
          write a complete text representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wcp

protected java.awt.Point[] wcp

min_i

protected int min_i

min_num_points

protected int min_num_points

is_closed

protected boolean is_closed

renderer

protected FigRenderer renderer

attribs

protected FigAttribs attribs

trafo

protected FigTrafo2D trafo

bbox

protected FigBbox bbox

painter

protected ObjectPainter painter

comment

protected java.lang.String comment

debug

protected boolean debug

syncRedrawFlag

protected boolean syncRedrawFlag

selected

protected boolean selected

showPoints

protected boolean showPoints

visible

protected boolean visible
Constructor Detail

FigPolyline

public FigPolyline()
default constructor: a polyline with default attributes at (0,0) Default drawing Color is black, no fill.


FigPolyline

public FigPolyline(int x0,
                   int y0,
                   boolean is_closed,
                   FigAttribs _attribs,
                   FigTrafo2D trafo)
Constructor with attributes, transformation, and first polyline vertex

Method Detail

createRenderer

public void createRenderer()

rebuild

public void rebuild()
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

isClosed

public boolean isClosed()
Is this polyline closed?

Specified by:
isClosed in interface FigObject

setIsClosed

public void setIsClosed(boolean b)

appendPoint

public void appendPoint(java.awt.Point p)
append a point (given in world-coordinates) to this polyline. The implementation currently copies the whole point array and then rebuild()s the polyline. This function also checks whether the point to append is identical to the last point of the polyline. If so, it does nothing.

Specified by:
appendPoint in interface FigObject

update_bbox

public void update_bbox()
build the polyline bounding box from the world-coordinate points.


setTrafo

public void setTrafo(FigTrafo2D trafo)
set a new transformation. If the transformation changed, we also rebuild() this polyline.

Specified by:
setTrafo in interface FigObject

setLayer

public void setLayer(int _layer)
set the layer (depth) for this polyline; the FIG format allows values in the range [1..1000] with 1 being the topmost layer. Note that changing the layer attribute DOES NOT AUTOMATICALLY re-sort the objectlist of the editor/viewer that this object belongs to. Therefore, you might want to do something like this: polyline.setLayer( newLayer ); editor.removeFromObjectList( polyline ); editor.insertIntoObjectList( polyline );


setArrowMode

public void setArrowMode(int _mode)
set a new arrow mode for this polyline; possible values are FigAttribs.NO_ARROW, FORWARD_ARROW, BACKWARD_ARROW, DOUBLE_ARROW.


setForwardArrow

public void setForwardArrow(int type,
                            double width,
                            double length,
                            double linewidth)
set the type (FigAttribs.SIMPLE_ARROW, TRIANGLE_ARROW, ...) and arrow heads width, length, and linewidth for the forward arrow of this polyline. For example, setForwardArrow( FigAttribs.TRIANGLE_ARROW, 2.0, 5.0, 1.0 ) specifies an arrowhead of length 5.0 mm, width 2.0 mm, and FIG linewidth 1. We use the factor 96.0 (~2400/25.4) to convert from millimeters to FIG units at 2400dpi.


setBackwardArrow

public void setBackwardArrow(int type,
                             double width,
                             double length,
                             double linewidth)
set the type and width, length, linewidth for the backward arrow of this polyline. For details, compare setForwardArrw().


setLineColor

public void setLineColor(java.awt.Color c)
set a new line color


setLineWidth

public void setLineWidth(int fig_line_width)
set the line width to one of the predefined FIG widths, e.g. setLineWidth( FigAttribs.LINE_WIDTH_1 )


setLineStyle

public void setLineStyle(int fig_line_style)
set the line style to one of the predefined FIG styles, e.g. setLineStyle( FigAttribs.DASHED_LINE )


setFillColor

public void setFillColor(java.awt.Color c)
set a new fill color


setFillStyle

public void setFillStyle(int shade_or_pattern)
set the fill style to one of the predefined FIG values, where -1 implies NO_FILL, a value between 0..40 selects the corresponding shade/tint, and values >= 41 select one of the FIG fill patterns.


minDistance

public double minDistance(java.awt.Point wp)
return the minimum distance of the polyline to the reference point wp. Currently, we use the Manhattan geometry to calculate the distance.

Specified by:
minDistance in interface FigObject

minDistanceEuclid

public double minDistanceEuclid(java.awt.Point wp)
return the minimal euclidean distance from point wp to the nearest segment of this polyline. In order to help the editor's findObjectAt() function to prefer exactly matching object vertices (like a rectangle corner) over an accidental zero euclidean distance to a polyline/polygon whose vertices are far away, we always add a penalty distance to the exact perpendicular distance as calculated by getMinPerpendicularDistance. Currently, we use a (small) penalty of 5 units (at 2400 dpi).

FIXME: This might use some bounding-box checks before doing the full calculation...

Specified by:
minDistanceEuclid in interface FigObject

toString

public java.lang.String toString()
toString() for debug purposes.

Specified by:
toString in interface FigObject

move

public void move(int dx,
                 int dy)
Description copied from interface: FigObject
method stub for the move() method

Specified by:
move in interface FigObject

copy

public FigObject copy()
build a copy of this FigPolyline.

Specified by:
copy in interface FigObject

canRotate

public boolean canRotate(double angle_in_rad)
returns true: it is always possible to rotate a polyline.

Specified by:
canRotate in interface FigObject

update

public void update(FigAttribs new_attribs)
update the attributes for this polyline.

Specified by:
update in interface FigObject
Parameters:
new_attribs - The current editor FigAttribs object.

mirrorX

public void mirrorX(int mirror_x,
                    int mirror_y)
simple implementation of mirrorX():

Specified by:
mirrorX in interface FigObject

mirrorY

public void mirrorY(int mirror_x,
                    int mirror_y)
simple implementation of mirrorY():

Specified by:
mirrorY in interface FigObject

supportsPointOps

public boolean supportsPointOps()
FigPolyline supports the Point insert/append/delete/... operations

Specified by:
supportsPointOps in interface FigObject

getPoints

public java.awt.Point[] getPoints()
return Point array (world coords)

Specified by:
getPoints in interface FigObject

setPoints

public void setPoints(java.awt.Point[] wcp)
set a new array of world-coordinate Points for this polyline. This function should be called by input parsers to construct a new polyline with many points: setPoints() is much faster than a loop with successive appendPoints().

Specified by:
setPoints in interface FigObject

insertPoint

public void insertPoint(java.awt.Point wp,
                        java.awt.Point wprev)
insert a Point wp after Point wprev into the Point array.

Specified by:
insertPoint in interface FigObject

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.

Specified by:
deletePoint in interface FigObject

indexOfNearestNeighbor

public int indexOfNearestNeighbor(java.awt.Point wp)

movePoint

public void movePoint(java.awt.Point wp,
                      java.awt.Point wpnew)
move a point from position wp to wpnew. This method fails, when no polygon point is found at position wp.

Specified by:
movePoint in interface FigObject

getMovePointNeighbors

public java.awt.Point[] getMovePointNeighbors(java.awt.Point wp)
getMovePointNeighbors(): Find the Point wcp[i] nearest to wp on this polyline. Return an array with the previous (if any) and next (if any) Point on this polyline.

Specified by:
getMovePointNeighbors in interface FigObject

getNeighborPoints

public java.awt.Point[] getNeighborPoints(java.awt.Point wp)
getNeighborPoints(): find the previous and next neighbor Points for Point wp on this polyline. Construct and return an array pp[3] --- where pp[0] is the previous Point, pp[1] the next Point, and pp[2] the index of the nearer of the previous and the next Point. This function is typically called to set the rubberbanding before moving a Point or insert()ing a new Point into the polyline.

Specified by:
getNeighborPoints in interface FigObject

getSegmentDistance

protected double getSegmentDistance(java.awt.Point P,
                                    java.awt.Point Q,
                                    java.awt.Point wp)
getSegmentDistance(): calculate the minimum distance of Point WP from the line segment from P to Q. This is used as a cost function in getNeighborPoints().


nearerPoint

protected java.awt.Point nearerPoint(java.awt.Point P1,
                                     java.awt.Point P2,
                                     java.awt.Point W)
nearerPoint(): Check whether wp is nearer to P1 than P2.


printCost

protected void printCost(int i,
                         double cost,
                         double min_cost)
printCost(): help debugging the segment cost functions.


calc_dist

public double calc_dist(java.awt.Point P)
get the minimum euclidean distance of Point p to any line segment of this polyline. Store the indices of the corresponding points of the polyline in global variable min_i.


getMinPerpendicularDistance

public double getMinPerpendicularDistance(java.awt.Point P)
calculate the minimum distance of Point P to the nearest segment of this polyline.
                  P
                  |
                  |
      Wi ---------*----------- Wi+1

      s_x    = wi+1_x - wi_x
      s_y    = wi+1_y - wi_y

      line_w = (x,y  | x = wi_x + alpha*s_x, y = wi_y + alpha*s_y)
      line_p = (x,y  | x + p_x  - beta *s_y, y = p_y  + beta*sx )

      and therefore: 
      x = wi_x + alpha*s_x = p_x - beta*s_y
      y = wi_y + alpha*s_y = p_y + beta*s_x

      If 0 < alpha < 1 we use the perpendicular distance, 
      if alpha < 0, P lies off Wi and we use the euclidean distance to Wi,
      if alpha > 1, P lies off Wi+1 and we use the euclidean distance to Wi+1
    


getMinPerpendicularDistance

public double getMinPerpendicularDistance(java.awt.Point P,
                                          java.awt.Point w1,
                                          java.awt.Point w2)
calculate the minimum distance of Point P to the nearest segment of this polyline.
                  P
                  |
                  |
      w1 ---------*----------- w2

      s_x    = w2_x - w1_x
      s_y    = w2_y - w1_y

      line_w = (x,y  | x = w1_x + alpha*s_x, y = w1_y + alpha*s_y)
      line_p = (x,y  | x + p_x  - beta *s_y, y = p_y  + beta*sx )

      and therefore: 
      x = w1_x + alpha*s_x = p_x - beta*s_y
      y = w1_y + alpha*s_y = p_y + beta*s_x

      If 0 < alpha < 1 we use the perpendicular distance, 
      if alpha < 0, P lies off Wi and we use the euclidean distance to Wi,
      if alpha > 1, P lies off Wi+1 and we use the euclidean distance to Wi+1
    


get_min_dist_index

public int get_min_dist_index(java.awt.Point P)
get the index of the minimum distance line segment from Point P to this polyline.


getMinDistPoint1

public java.awt.Point getMinDistPoint1()

getMinDistPoint2

public java.awt.Point getMinDistPoint2()

isVisible

public boolean isVisible(FigBbox viewport)
Description copied from interface: FigDrawable
is this object visible within the given FigBbox?

Specified by:
isVisible in interface FigObject

isVisible

public boolean isVisible()
Specified by:
isVisible in interface FigObject

setVisible

public void setVisible(boolean b)
Specified by:
setVisible in interface FigObject

initialize

public boolean initialize(java.lang.String s)
Specified by:
initialize in interface FigObject

setObjectPainter

public void setObjectPainter(ObjectPainter painter)
Specified by:
setObjectPainter in interface FigObject

getObjectPainter

public ObjectPainter getObjectPainter()

getTrafo

public FigTrafo2D getTrafo()
Description copied from interface: FigObject
get transformation

Specified by:
getTrafo in interface FigObject

getLayer

public int getLayer()
Description copied from interface: FigObject
get layer (depth)

Specified by:
getLayer in interface FigObject

getBbox

public FigBbox getBbox()
return the world-coordinates bounding box of this polyline. The implementation currently returns the bounding box of all vertices (=control points) of the polyline, which might be useable (if not optimal) for subclasses, too.

Specified by:
getBbox in interface FigObject

get_sc_bbox

public FigBbox get_sc_bbox()
calculate the current screen-coordinates bounding box

Specified by:
get_sc_bbox in interface FigObject

getPosition

public java.awt.Point getPosition()
return the base point of this polyline. Currently, we use the first vertex (wcp[0]) as the base point, or (0,0) is no control points have been set.

Specified by:
getPosition in interface FigObject

getAttributes

public FigAttribs getAttributes()
Description copied from interface: FigObject
get object attributes

Specified by:
getAttributes in interface FigObject

setAttributes

public void setAttributes(FigAttribs attributes)
Specified by:
setAttributes in interface FigObject

updateAttributes

public void updateAttributes(java.lang.String s)
Specified by:
updateAttributes in interface FigObject

set_debug

public void set_debug()
Description copied from interface: FigObject
set debug flag

Specified by:
set_debug in interface FigObject

reset_debug

public void reset_debug()
Description copied from interface: FigObject
reset debug flag

Specified by:
reset_debug in interface FigObject

scale

public void scale(java.awt.Point origin,
                  double factor_x,
                  double factor_y)
scale the polyline. We modify all object points corresponding to the given scale factors in x and y directions, with the "origin" point remaining fixed.

We also modify the line width, line dash length, and arrow size corresponding to the factor_x value, unless the SetupManager property "jfig.scaleLineWidth" is "false".

Specified by:
scale in interface FigObject

rotate

public void rotate(java.awt.Point anchor,
                   double angle_in_rad)
            throws java.lang.Exception
Description copied from interface: FigObject
method stub for rotate() - allow for Exceptions if the object doesn't support the specified angle.

Specified by:
rotate in interface FigObject
Throws:
java.lang.Exception

showPoints

public void showPoints()
Description copied from interface: FigObject
method stub for the showPoints() method. The object will paint() its control points (e.g. the bbox for a rectangle, origin and radius for a circle, the control points for a spline). Similar to xfig, these points should be marked with small rectangles. showPoints() is deactivated again by calling deselect().

Specified by:
showPoints in interface FigObject

select

public void select()
Description copied from interface: FigObject
method stub for the select() method. Similar to xfig, a selected object will paint its control points with small filled rectangles. select() is deactivated again by calling deselect().

Specified by:
select in interface FigObject

deselect

public void deselect()
Description copied from interface: FigObject
mehtod stub for the deselect() mehtod

Specified by:
deselect in interface FigObject

isSelected

public boolean isSelected()
Description copied from interface: FigObject
get current selection status

Specified by:
isSelected in interface FigObject

isShowPoints

public boolean isShowPoints()

numPoints

public int numPoints()
Description copied from interface: FigObject
get number of Points in this object

Specified by:
numPoints in interface FigObject

getText

public java.lang.String getText()
Description copied from interface: FigObject
get the object's text, if any

Specified by:
getText in interface FigObject

setText

public void setText(java.lang.String s)
Description copied from interface: FigObject
set the object's text

Specified by:
setText in interface FigObject

getNearestPoint

public java.awt.Point getNearestPoint(java.awt.Point target)
Description copied from interface: FigObject
return the point of this object nearest to Point wp, if any.

Specified by:
getNearestPoint in interface FigObject

manhattan

public int manhattan(java.awt.Point p,
                     java.awt.Point q)

keyPressed

public void keyPressed(java.awt.event.KeyEvent event)
Description copied from interface: FigObject
react to a key event (e.g. for a text object)

Specified by:
keyPressed in interface FigObject

writeAsResource

public void writeAsResource(java.io.PrintWriter writer)
Description copied from interface: FigObject
write a complete text representation of this object

Specified by:
writeAsResource in interface FigObject

getComment

public java.lang.String getComment()
Description copied from interface: FigObject
get the comment for this object (may be null).

Specified by:
getComment in interface FigObject

setComment

public void setComment(java.lang.String s)
Description copied from interface: FigObject
set a comment for this object.

Specified by:
setComment in interface FigObject

getSyncRedrawFlag

public boolean getSyncRedrawFlag()
Description copied from interface: FigDrawable
is a sync redraw pending on this object?

Specified by:
getSyncRedrawFlag in interface FigDrawable

setSyncRedrawFlag

public void setSyncRedrawFlag(boolean b)
Description copied from interface: FigDrawable
set or reset whether this objects needs a sync redraw

Specified by:
setSyncRedrawFlag in interface FigDrawable

message

public void message(java.lang.String s)

paint

public void paint(java.awt.Graphics g)
paint this polyline using either AWT 1.1 or Java2D

Specified by:
paint in interface FigObject

paint

public void paint(java.awt.Graphics g,
                  FigTrafo2D trafo)
Description copied from interface: FigDrawable
paint this object using the specified transformation and Graphics g

Specified by:
paint in interface FigObject

paintSave

public void paintSave(java.awt.Graphics g,
                      FigTrafo2D trafo)
Specified by:
paintSave in interface FigObject