ModraUp Ruby API Documentation Ruby API Reference

Class: Layout::Rectangle

Inherits:
Layout::Path show all

Overview

Rectangle (closed path).

Examples:

frame = Layout::Rectangle.new(Geom::Bounds2d.new(5.mm, 5.mm, 410.mm, 287.mm))

Class Method Summary # collapse

Instance Method Summary # collapse

Inherited from Layout::Path

Inherited from Layout::Entity

Class Method Details

Layout::Rectangle.new(bounds) ⇒ Layout::Rectangle

Create a Rectangle by Corner Points.

Parameters:

  • bounds (Geom::Bounds2d) inch on the drawing sheet

Returns:

  • (Layout::Rectangle)

Raises:

  • [ArgumentError] The corner radius was passed (round rectangles are not supported).
Note: ModraUp extension. Does not support rounding overload for LayOut; use the corner rounding tool or Layout::Path for rounding.

Examples:

Layout::Rectangle.new(Geom::Bounds2d.new(1, 1, 2, 1))