Package-level declarations
Types
Represents a rectangular grid structure composed of lists of Rectangle instances.
Properties
Functions
Adjusts the dimensions and position of the rectangle based on the provided parameters. The method calculates the new dimensions and coordinates of the rectangle based on specified values for left, right, top, bottom, width, or height. If conflicting parameters are provided (e.g., both left
and right
or top
and bottom
), an error is thrown.
Aligns a list of rectangles horizontally relative to a specified rectangle.
Aligns the rectangles in the list vertically to a reference rectangle. The vertical position of each rectangle is determined based on the reference rectangle and the specified vertical anchor point.
Extracts a sub-block from a 2D list of rectangles based on the specified coordinates and dimensions.
Distributes the rectangles in the list horizontally within a specified bounding rectangle.
Distributes the rectangles in the list vertically within the given bounding rectangle. The rectangles are spaced evenly, ensuring an equal distance between them, while maintaining their original height and width.
Drops the first n columns from a 2D list of Rectangles.
Removes the last n
columns from each row (inner list) within a two-dimensional list.
Distributes a list of rectangles horizontally within a given container rectangle, maintaining their relative width proportions and adding an optional gutter between them.
Fits a list of rectangles within a given vertical rectangular area. Each rectangle's height is adjusted proportionally based on its original height relative to the total height of all rectangles in the list. The rectangles are then distributed vertically, with an optional gutter spacing between them.
Retrieves a Rectangle from a two-dimensional list of Rectangles based on the specified x and y indices.
Retrieves a list of rectangles at a specific x-coordinate for a range of y-coordinates from a 2D list of rectangles.
Retrieves a sublist of Rectangle objects from a two-dimensional List given a range of indices for rows and a specific column index.
Retrieves a subgrid from a 2D list of Rectangles based on the specified ranges.
Splits Rectangle into a grid of Rectangles
Split Box into a grid of Boxes
Computes the intersection of the current box with another box. If the two boxes intersect, the resulting box represents the overlapping region. If the two boxes do not intersect, an empty box is returned.
Computes the intersection of two rectangles and returns the resulting rectangle. If the rectangles do not intersect, an empty rectangle is returned.
Performs conformal inversion of another circle.
Divides a rectangle into a grid of sub-rectangles with irregular spacing, based on the specified column and row weights. Optionally, margins can be applied on both the horizontal and vertical directions.
Places a given box relative to this box using specified anchor points. This method computes the position of the placed box based on the anchor points of both the current box and the given box. The resulting box maintains the dimensions of the given box and is positioned at the calculated location.
Places a given rectangle (item
) within the bounds of the current rectangle (this
), positioning it based on the specified anchor point.
Places this box inside the specified container box using anchor points to determine the relative positioning.
Positions the current rectangle (this
) within the given container
rectangle. The placement is determined by aligning the itemAnchor
of the current rectangle to the anchor
point within the container rectangle.
Creates a beveled polygon at center with the given sides and radius. Specify a phase in degrees to rotate it. If 0.0 <bevelFactor< 1.0 the number of sides is doubled. Using 0.5 all sides have equal length. With other values bevelFactor determines the length ratio between even and odd sides.
Creates a rounded polygon at center with the given sides and radius. Specify a phase in degrees to rotate it. roundFactor 0.0 = no rounding, 0.5 = default, 1.0 = full rounding.
Selects specific columns from a two-dimensional list of rectangles. The method slices each inner list based on the provided column indices.
Slices the specified range of columns from each row of a two-dimensional list.
Splits the current Box into two smaller Boxes at the specified x-coordinate if the coordinate resides within the box's x-axis range.
Splits the current Rectangle into two smaller rectangles at a specified x-coordinate.
Splits the current Box object into two separate boxes along the given Y-coordinate. If the Y-coordinate falls within the vertical range of the box, the method produces two new boxes divided at the specified Y-coordinate. If the Y-coordinate is outside the vertical range, the method returns the original box unchanged.
Splits the rectangle horizontally at the specified y
value if the value lies within the rectangle's vertical range.
Subtracts a given Box from each Box in the list and returns a list of the resulting Boxes.
Subtracts a rectangle from a list of rectangles, removing overlapping areas and returning the non-overlapping parts of the original rectangles.
Subtracts the given Box from the current Box and returns the remaining parts of the current Box that do not intersect with the given Box.
Subtracts the given rectangle other
from the current rectangle, splitting and removing overlapping areas and returning the remaining non-overlapping parts as a list of rectangles.
Creates a new Rectangle by modifying its dimensions and position based on the provided parameters. The method adjusts the position and size of the rectangle depending on which of the optional parameters are supplied. Any omitted parameters are calculated to maintain the rectangle's overall layout.
Selects the first n
columns from each row in a 2D list of Rectangle
objects.
Returns a new list where each sub-list contains only the last n
elements of the original sub-list.
Transposes a 2D list of rectangles, switching rows and columns.
Extracts a uniform random sub-block of rectangles from a 2D list within the specified constraints.