Class JDRectangle


public class JDRectangle extends JDRectangular
JDraw Rectangle graphic object.
  • Constructor Details

    • JDRectangle

      public JDRectangle(String objectName, int x, int y, int w, int h)
      Contructs a JDRectangle.
      Parameters:
      objectName - Object name
      x - Up left corner x coordinate
      y - Up left corner y coordinate
      w - Rectangle width
      h - Rectangle height
  • Method Details

    • copy

      public JDObject copy(int x, int y)
      Description copied from class: JDObject
      Returns a copy of this object at the specified location.
      Specified by:
      copy in class JDObject
      Parameters:
      x - Horizontal position of the copied object (pixel)
      y - Vertical Position of the copied object (pixel)
      Returns:
      The copy of this object.
    • isInsideObject

      public boolean isInsideObject(int x, int y)
      Overrides:
      isInsideObject in class JDObject
      Parameters:
      x - X coordinate (pixel)
      y - Y coordinate (pixel)
      Returns:
      whether the specified point is inside this object.
    • convertToPolyline

      public JDPolyline convertToPolyline()