public class Spline extends GlyphList
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
color |
protected float |
strokeWidth |
protected java.lang.String |
style |
Constructor and Description |
---|
Spline(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2) |
Spline(Spline clone) |
Modifier and Type | Method and Description |
---|---|
boolean |
__intersects(java.awt.geom.Rectangle2D rect) |
double |
distanceTo(java.awt.geom.Point2D p)
Compute distance from this spline to given point.
|
float |
getStrokeWidth() |
java.lang.String |
getStyle() |
void |
paint(java.awt.Graphics2D g2d) |
void |
setColor(java.awt.Color c) |
void |
setCoordinates(java.awt.geom.Point2D[] coordinates)
Update the curve segments of this spline using the
given array of points.
|
void |
setStrokeWidth(float strokeWidth) |
void |
setStyle(java.lang.String style) |
add, add, add, clear, contains, dump, get, getBounds, getGlyphishInArray, getGlyphishInCollection, getGlyphThing, getHeight, getListIterator, getWidth, inside, intersects, length, remove, setHeight, setWidth, toString, transform
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, rotate, rotate, scale, setKeyAction, setMouseAction, shear, translate, unsetMouseAction
_getAttribute, _setAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsChar, getAttributeAsClosure, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsShort, getAttributeAsString, getKeys, getStaticAttribute, getStaticKeys, isAttribute, isStaticAttribute, removeAllAttributes, removeAllStaticAttributes, removeAttribute, removeStaticAttribute, setAttribute, setStaticAttribute, showAttributes, showAttributes
protected java.lang.String style
protected float strokeWidth
protected java.awt.Color color
public Spline(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
public Spline(Spline clone)
public void setCoordinates(java.awt.geom.Point2D[] coordinates)
If using DOT layout, these are all points without "s," or "e," attributes in the list pos="..."
coordinates
- Array of Point2D's defining curvepublic java.lang.String getStyle()
public void setStyle(java.lang.String style)
public void setColor(java.awt.Color c)
public float getStrokeWidth()
public void setStrokeWidth(float strokeWidth)
public double distanceTo(java.awt.geom.Point2D p)
p
- Point to calculate distance topublic boolean __intersects(java.awt.geom.Rectangle2D rect)