Class CanvasSize


  • public class CanvasSize
    extends Object
    A canvas size, with a top left coordinate, a width and an heigth.
    Author:
    Jeremy Subtil
    • Constructor Summary

      Constructors 
      Constructor Description
      CanvasSize()
      Constructs the default CanvasSize, with both width and height equal to zero.
      CanvasSize​(float x, float y, float width, float height)
      Constructor.
    • Constructor Detail

      • CanvasSize

        public CanvasSize​(float x,
                          float y,
                          float width,
                          float height)
        Constructor.
        Parameters:
        x - The x coordinate of the top left position
        y - The y coordinate of the top left position
        width - The canvas width
        height - The canvas height
      • CanvasSize

        public CanvasSize()
        Constructs the default CanvasSize, with both width and height equal to zero.
    • Method Detail

      • getX

        public float getX()
        Returns the x coordinate of the top left position.
        Returns:
        the x coordinate of the top left position
      • getY

        public float getY()
        Returns the y coordinate of the top left position.
        Returns:
        the y coordinate of the top left position
      • getWidth

        public float getWidth()
        Returns the canvas width.
        Returns:
        the canvas width
      • getHeight

        public float getHeight()
        Returns the canvas height.
        Returns:
        the canvas height
      • getMaxX

        public float getMaxX()
        Returns the x coordinate of the bottom right position.
        Returns:
        the x coordinate of the bottom right position
      • getMaxY

        public float getMaxY()
        Returns the y coordinate of the bottom right position.
        Returns:
        the y coordinate of the bottom right position