java.lang.Object
com.port80.graph.dot.impl.DotPolyline
- public class DotPolyline
- extends java.lang.Object
Wrapper of a dynamic allocated array of pre-allocated DotPoint.
The point array are pre-allocated with DotPoint so they can be
reused without having to be re-allocated each time.
. The class keep its own copy of the points so prevent cross
linking with other objects.
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
pts
public DotPoint[] pts
size
public int size
isClosed
public boolean isClosed
DotPolyline
public DotPolyline()
DotPolyline
public DotPolyline(int n)
add
public void add(DotPoint pt)
add
public void add(double x,
double y)
get
public DotPoint get(int i)
size
public int size()
reset
public DotPolyline reset()
close
public void close()
- Close the polyline as a polygon with the starting point at the
end, so we don't have to wrap around to 0.
isClosed
public boolean isClosed()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
toGeneralPath
public java.lang.String toGeneralPath()
toGeneralPath
public java.lang.String toGeneralPath(int lwidth)
grow
public void grow(int n)
growTo
public void growTo(int max)