Class ScreenPoint

java.lang.Object
com.j3d.engine.math.BasePoint<Integer>
com.j3d.engine.math.ScreenPoint

public final class ScreenPoint extends BasePoint<Integer>
ScreenPoint, not to be confused with CartesianPoint, is a point on the actual screen (window) open. Where (0, 0) is the top left corner of the window.

All 2d points should be calculated in CartesianPoint, but when you want to show it on the screen, converted to a ScreenPoint

Author:
Lehlogonolo Poole
See Also:
  • Constructor Details

    • ScreenPoint

      public ScreenPoint(int X, int Y)
      Default Constructor
      Parameters:
      X - The X-Value
      Y - The Y-Value
  • Method Details

    • toPoint

      public CartesianPoint toPoint()
      Converts this ScreenPoint back into it's CartesianPoint using the global Conversion properties defined by Conversion.global()
      Returns:
      A CartesianPoint
    • toPoint

      @Contract(pure=true) public CartesianPoint toPoint(Conversion conversion)
      Converts the Screen Point into a CartesianPoint.
      Parameters:
      conversion - The conversion properties
      Returns:
      The CartesianPoint coordinates of this ScreenPoint.
    • toPoint

      @Contract(pure=true) public CartesianPoint toPoint(@NotNull ConversionWithOffset conversion)
      Converts the Screen Point into a CartesianPoint.
      Parameters:
      conversion - The conversion properties
      Returns:
      The CartesianPoint coordinates of this ScreenPoint.
    • toSwingPoint

      public Point toSwingPoint()
      Returns the ScreenPoint as Point
      Returns:
      A Point
    • toMacroPoint

      public String toMacroPoint()
    • fromMacroPoint

      @NotNull @Contract("_ -> new") public static ScreenPoint fromMacroPoint(@NotNull String macroPoint)
    • toString

      public String toString()
      Overrides:
      toString in class Object