Class BasicRectangle

    • Constructor Detail

      • BasicRectangle

        public BasicRectangle​(java.awt.geom.Rectangle2D rect)
        Create a new rectangle with the given rectangle shape, a unit-width continuous stroke and no paint pattern.
      • BasicRectangle

        public BasicRectangle​(double x,
                              double y,
                              double width,
                              double height)
        Create a new rectangle with the given origin and size, a unit-width continuous stroke and no paint pattern.
      • BasicRectangle

        public BasicRectangle​(double x,
                              double y,
                              double width,
                              double height,
                              java.awt.Paint fill)
        Create a new rectangle with the given origin, size, and fill paint. It has no outline.
      • BasicRectangle

        public BasicRectangle​(java.awt.geom.Rectangle2D bounds,
                              java.awt.Paint fill)
        Create a new rectangle with the given bounds and fill paint. It has no outline.
      • BasicRectangle

        public BasicRectangle​(double x,
                              double y,
                              double width,
                              double height,
                              float lineWidth)
        Create a new rectangle with the given origin, size, and outline width. It has no fill.
      • BasicRectangle

        public BasicRectangle​(double x,
                              double y,
                              double width,
                              double height,
                              java.awt.Paint fill,
                              float lineWidth)
        Create a new rectangle with the given origin, size, fill, and outline width.
    • Method Detail

      • translate

        public void translate​(double x,
                              double y)
        Translate the rectangle the given distance
        Specified by:
        translate in interface Figure
        Overrides:
        translate in class AbstractFigure
        Parameters:
        x - The x value to be moved.
        y - The y value to be moved.