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 coords
    int 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 filled
    void scale​(double scale)
    scale each point
    java.lang.String toString()  
    void translate​(double x, double y)
    add x, y to each point

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

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

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