| |
- builtins.tuple(builtins.object)
-
- RectangleGrid
- RectangleIndex
class RectangleGrid(builtins.tuple) |
|
RectangleGrid(rect: svgen.cartesian.rectangle.Rectangle, columns: int, rows: int)
A class for locating points within a rectangle. |
|
- Method resolution order:
- RectangleGrid
- builtins.tuple
- builtins.object
Methods defined here:
- __call__(self, x: float, y: float) -> svgen.cartesian.point.Point
- Get the true location of a point within this grid.
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new RectangleGrid object replacing specified fields with new values
- adjust(self, columns: int = None, rows: int = None, rect: svgen.cartesian.rectangle.Rectangle = None) -> 'RectangleGrid'
- Create a new grid from new parameters.
- box(self, x: float, y: float) -> svgen.cartesian.rectangle.Rectangle
- Get a rectangle object from provided coordinates.
- translate(self, dx: Union[svgen.cartesian.mutate.Translation, float], *args, **kwargs) -> 'RectangleGrid'
- Translate this rectangle grid.
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new RectangleGrid object from a sequence or iterable
Static methods defined here:
- __new__(_cls, rect: svgen.cartesian.rectangle.Rectangle, columns: int, rows: int)
- Create new instance of RectangleGrid(rect, columns, rows)
Readonly properties defined here:
- boxes
- Iterate over boxes belonging to this grid.
- enumerate_boxes
- Iterate over boxes belonging to this grid.
- points
- Iterate over points in the grid.
- x_scale
- Get the scalar value for 'x' coordinates.
- y_scale
- Get the scalar value for 'y' coordinates.
Data descriptors defined here:
- rect
- Alias for field number 0
- columns
- Alias for field number 1
- rows
- Alias for field number 2
Data and other attributes defined here:
- __annotations__ = {'columns': <class 'int'>, 'rect': <class 'svgen.cartesian.rectangle.Rectangle'>, 'rows': <class 'int'>}
- __match_args__ = ('rect', 'columns', 'rows')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('rect', 'columns', 'rows')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
|
class RectangleIndex(builtins.tuple) |
|
RectangleIndex(column: int, row: int)
An index into a rectangle grid. |
|
- Method resolution order:
- RectangleIndex
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new RectangleIndex object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new RectangleIndex object from a sequence or iterable
Static methods defined here:
- __new__(_cls, column: int, row: int)
- Create new instance of RectangleIndex(column, row)
Data descriptors defined here:
- column
- Alias for field number 0
- row
- Alias for field number 1
Data and other attributes defined here:
- __annotations__ = {'column': <class 'int'>, 'row': <class 'int'>}
- __match_args__ = ('column', 'row')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('column', 'row')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
| |