Package com.softsynth.jmsl.score
Class SegmentPath
java.lang.Object
com.softsynth.jmsl.score.SegmentPath
public class SegmentPath
extends java.lang.Object
A sequence of x,y coordinates with some transformations, like polygon, but
not closed JMSL Notation Project
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
copyright
-
Constructor Summary
Constructors Constructor Description SegmentPath(int[] xsequence, int[] ysequence)
-
Method Summary
Modifier and Type Method Description void
flip()
negate y coordsint
length()
static void
main(java.lang.String[] args)
void
render(java.awt.Graphics g)
void
render(java.awt.Graphics g, boolean isFilled)
void
renderFilled(java.awt.Graphics g)
treat path as a polygon and draw it filledvoid
scale(double scale)
scale each pointjava.lang.String
toString()
void
translate(double x, double y)
add x, y to each pointMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
SegmentPath
public SegmentPath(int[] xsequence, int[] ysequence)
-
-
Method Details
-
length
public int length() -
flip
public void flip()negate y coords -
translate
public void translate(double x, double y)add x, y to each point -
scale
public void scale(double scale)scale each point -
render
public void render(java.awt.Graphics g, boolean isFilled) -
render
public void render(java.awt.Graphics g) -
renderFilled
public void renderFilled(java.awt.Graphics g)treat path as a polygon and draw it filled -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-