com.softsynth.jmsl.score
Class SegmentPath

java.lang.Object
  extended by 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
static java.lang.String copyright
           
 
Constructor Summary
SegmentPath(int[] xsequence, int[] ysequence)
           
 
Method Summary
 void flip()
          negate y coords
 int length()
           
static void main(java.lang.String[] args)
           
 void render(java.awt.Graphics g)
           
 void renderFilled(java.awt.Graphics g)
          treat path as a polygon and draw it filled
 void scale(double scale)
          scale each point
 java.lang.String toString()
           
 void translate(int x, int y)
          add x, y to each point
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values
Constructor Detail

SegmentPath

public SegmentPath(int[] xsequence,
                   int[] ysequence)
Method Detail

length

public int length()

flip

public void flip()
negate y coords


translate

public void translate(int x,
                      int y)
add x, y to each point


scale

public void scale(double scale)
scale each point


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 class java.lang.Object

main

public static void main(java.lang.String[] args)