com.davisor.graphics
Class BetterPath.Segment

java.lang.Object
  extended bycom.davisor.graphics.BetterPath.Segment
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
BetterPath

protected class BetterPath.Segment
extends java.lang.Object
implements java.io.Serializable

BetterPath.Segment implements a path segment for the principal shape path storage mechanism.

See Also:
BetterPath.Iterator, Serialized Form

Field Summary
protected  double[] M_coords
          Segment coordinates.
protected  int M_type
          Segment type.
 
Constructor Summary
protected BetterPath.Segment(int type, double[] coords)
          Creates a new segment.
protected BetterPath.Segment(int type, java.util.List coords)
          Extracts segment information from segment type and coordinate list.
protected BetterPath.Segment(java.awt.geom.PathIterator iterator)
          Extract segment information from the iterator current segment.
 
Method Summary
 java.lang.String toString()
          Gets the string representation of current path segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

M_coords

protected double[] M_coords
Segment coordinates.


M_type

protected int M_type
Segment type.

Constructor Detail

BetterPath.Segment

protected BetterPath.Segment(java.awt.geom.PathIterator iterator)
Extract segment information from the iterator current segment.


BetterPath.Segment

protected BetterPath.Segment(int type,
                             double[] coords)
Creates a new segment.


BetterPath.Segment

protected BetterPath.Segment(int type,
                             java.util.List coords)
Extracts segment information from segment type and coordinate list. The list is expected to contain 0, 2, 4, or 6 coordinate string values. If it contains 4 or 6 coordinates, the segment type is forced to SEG_QUADTO or SEG_CUBICTO, respectively.

Parameters:
type - segment type, as defined by Java PathIterator
coords - a list of coordinate string or double values
Method Detail

toString

public java.lang.String toString()
Gets the string representation of current path segment. Please see class description for more information about shape string syntax.

See Also:
BetterPath.points(int), BetterPath.prefix(int), BetterPath.toString()


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.