Class Point2DShape

java.lang.Object
mgui.interfaces.shapes.util.Point2DShape

public class Point2DShape
extends java.lang.Object
Represents a 2D point object, rendering a vector at a specified coordinate
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Summary

    Fields
    Modifier and Type Field Description
    java.util.ArrayList<java.lang.Boolean> fill  
    float scale  
    java.util.ArrayList<java.awt.Shape> shape  
  • Constructor Summary

    Constructors
    Constructor Description
    Point2DShape​(java.util.ArrayList<java.awt.Shape> shape, java.util.ArrayList<java.lang.Boolean> fill)  
  • Method Summary

    Modifier and Type Method Description
    void draw​(java.awt.Graphics2D g, java.awt.Point origin, float scale, float rotate)
    Draw this point, centered on origin
    static Point2DShape getFilledArrow​(double scale)
    Returns a basic filled arrow shape, oriented to the right (angle == 0).
    static Point2DShape getFilledCircle​(double scale)  
    void setScale​(float scale)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • shape

      public java.util.ArrayList<java.awt.Shape> shape
    • fill

      public java.util.ArrayList<java.lang.Boolean> fill
    • scale

      public float scale
  • Constructor Details

    • Point2DShape

      public Point2DShape​(java.util.ArrayList<java.awt.Shape> shape, java.util.ArrayList<java.lang.Boolean> fill)
  • Method Details

    • draw

      public void draw​(java.awt.Graphics2D g, java.awt.Point origin, float scale, float rotate)
      Draw this point, centered on origin
      Parameters:
      g -
      origin -
      scale -
      rotate -
    • setScale

      public void setScale​(float scale)
    • getFilledCircle

      public static Point2DShape getFilledCircle​(double scale)
    • getFilledArrow

      public static Point2DShape getFilledArrow​(double scale)
      Returns a basic filled arrow shape, oriented to the right (angle == 0). Can thus simply be rotated to suit a particular line segment, angle, etc..
      Parameters:
      scale -
      Returns: