search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``igraph`.`drawing`.`utils`.`Rectangle``

class documentation

`class Rectangle: (source)`

Known subclasses: `igraph.drawing.utils.BoundingBox`

Constructor: `Rectangle(*args)`

View In Hierarchy

Class representing a rectangle.

Method | `__bool__` | Undocumented
Method | `__eq__` | Undocumented
Method | `__hash__` | Undocumented
Method | `__init__` | Creates a rectangle.
Method | `__ior__` | Expands this rectangle to include itself and another completely while still being as small as possible.
Method | `__ne__` | Undocumented
Method | `__repr__` | Undocumented
Method | `bottom.setter` | Sets the Y coordinate of the bottom edge of the box
Method | `contract` | Contracts the rectangle by the given margins.
Method | `coords.setter` | Sets the coordinates of the corners.
Method | `expand` | Expands the rectangle by the given margins.
Method | `height.setter` | Sets the height of the rectangle by adjusting the bottom edge.
Method | `intersection` | Returns the intersection of this rectangle with another.
Method | `isdisjoint` | Returns `True` if the two rectangles have no intersection.
Method | `isempty` | Returns `True` if the rectangle is empty (i.e. it has zero width and height).
Method | `left.setter` | Sets the X coordinate of the left side of the box
Method | `midx.setter` | Moves the center of the box to the given X coordinate
Method | `midy.setter` | Moves the center of the box to the given Y coordinate
Method | `right.setter` | Sets the X coordinate of the right side of the box
Method | `shape.setter` | Sets the shape of the rectangle (width, height).
Method | `top.setter` | Sets the Y coordinate of the top edge of the box
Method | `translate` | Translates the rectangle in-place.
Method | `union` | Returns the union of this rectangle with another.
Method | `width.setter` | Sets the width of the rectangle by adjusting the right edge.
Class Variable | `__slots__` | Undocumented
Instance Variable | `height` | The height of the rectangle
Instance Variable | `width` | The width of the rectangle
Property | `bottom` | The Y coordinate of the bottom edge of the box
Property | `coords` | The coordinates of the corners.
Property | `left` | The X coordinate of the left side of the box
Property | `midx` | The X coordinate of the center of the box
Property | `midy` | The Y coordinate of the center of the box
Property | `right` | The X coordinate of the right side of the box
Property | `shape` | The shape of the rectangle (width, height)
Property | `top` | The Y coordinate of the top edge of the box
Instance Variable | `_bottom` | Undocumented
Instance Variable | `_left` | Undocumented
Instance Variable | `_right` | Undocumented
Instance Variable | `_top` | Undocumented

def __bool__(self): (source)

Undocumented

def __eq__(self, other): (source)

Undocumented

def __hash__(self): (source)

Undocumented

def __init__(self, *args): (source)

Creates a rectangle.

The corners of the rectangle can be specified by either a tuple (four items, two for each corner, respectively), four separate numbers (X and Y coordinates for each corner) or two separate numbers (width and height, the upper left corner is assumed to be at (0,0))

def __ior__(self, other): (source)
overridden in `igraph.drawing.utils.BoundingBox`

Expands this rectangle to include itself and another completely while still being as small as possible.

Example:

        >>> r1 = Rectangle(10, 10, 30, 30)
        >>> r2 = Rectangle(20, 20, 50, 50)
        >>> r3 = Rectangle(70, 70, 90, 90)
        >>> r1 |= r2
        >>> r1
        Rectangle(10.0, 10.0, 50.0, 50.0)
        >>> r1 |= r3
        >>> r1
        Rectangle(10.0, 10.0, 90.0, 90.0)

def __ne__(self, other): (source)

Undocumented

def __repr__(self): (source)

Undocumented

@bottom.setter
def bottom(self, value): (source)

Sets the Y coordinate of the bottom edge of the box

def contract(self, margins): (source)

Contracts the rectangle by the given margins.

Returns
a new `Rectangle` object.

@coords.setter
def coords(self, coords): (source)

Sets the coordinates of the corners.

Parameters
coords | a 4-tuple with the coordinates of the corners

def expand(self, margins): (source)

Expands the rectangle by the given margins.

Returns
a new `Rectangle` object.

@height.setter
def height(self, value): (source)

Sets the height of the rectangle by adjusting the bottom edge.

def intersection(self, other): (source)

Returns the intersection of this rectangle with another.

Example:

        >>> r1 = Rectangle(10, 10, 30, 30)
        >>> r2 = Rectangle(20, 20, 50, 50)
        >>> r3 = Rectangle(70, 70, 90, 90)
        >>> r1.intersection(r2)
        Rectangle(20.0, 20.0, 30.0, 30.0)
        >>> r2 & r1
        Rectangle(20.0, 20.0, 30.0, 30.0)
        >>> r2.intersection(r1) == r1.intersection(r2)
        True
        >>> r1.intersection(r3)
        Rectangle(0.0, 0.0, 0.0, 0.0)

def isdisjoint(self, other): (source)

Returns `True` if the two rectangles have no intersection.

Example:

        >>> r1 = Rectangle(10, 10, 30, 30)
        >>> r2 = Rectangle(20, 20, 50, 50)
        >>> r3 = Rectangle(70, 70, 90, 90)
        >>> r1.isdisjoint(r2)
        False
        >>> r2.isdisjoint(r1)
        False
        >>> r1.isdisjoint(r3)
        True
        >>> r3.isdisjoint(r1)
        True

def isempty(self): (source)

Returns `True` if the rectangle is empty (i.e. it has zero width and height).

Example:

        >>> r1 = Rectangle(10, 10, 30, 30)
        >>> r2 = Rectangle(70, 70, 90, 90)
        >>> r1.isempty()
        False
        >>> r2.isempty()
        False
        >>> r1.intersection(r2).isempty()
        True

@left.setter
def left(self, value): (source)

Sets the X coordinate of the left side of the box

@midx.setter
def midx(self, value): (source)

Moves the center of the box to the given X coordinate

@midy.setter
def midy(self, value): (source)

Moves the center of the box to the given Y coordinate

@right.setter
def right(self, value): (source)

Sets the X coordinate of the right side of the box

@shape.setter
def shape(self, shape): (source)

Sets the shape of the rectangle (width, height).

@top.setter
def top(self, value): (source)

Sets the Y coordinate of the top edge of the box

def translate(self, dx, dy): (source)

Translates the rectangle in-place.

Example:

    >>> r = Rectangle(10, 20, 50, 70)
    >>> r.translate(30, -10)
    >>> r
    Rectangle(40.0, 10.0, 80.0, 60.0)

Parameters
dx | the X coordinate of the translation vector
dy | the Y coordinate of the translation vector

def union(self, other): (source)

Returns the union of this rectangle with another.

The resulting rectangle is the smallest rectangle that contains both rectangles.

Example:

        >>> r1 = Rectangle(10, 10, 30, 30)
        >>> r2 = Rectangle(20, 20, 50, 50)
        >>> r3 = Rectangle(70, 70, 90, 90)
        >>> r1.union(r2)
        Rectangle(10.0, 10.0, 50.0, 50.0)
        >>> r2 | r1
        Rectangle(10.0, 10.0, 50.0, 50.0)
        >>> r2.union(r1) == r1.union(r2)
        True
        >>> r1.union(r3)
        Rectangle(10.0, 10.0, 90.0, 90.0)

@width.setter
def width(self, value): (source)

Sets the width of the rectangle by adjusting the right edge.

__slots__: `tuple[str, ...]` = (source)

Undocumented

@property
height = (source)

The height of the rectangle

@property
width = (source)

The width of the rectangle

@property
bottom = (source)

The Y coordinate of the bottom edge of the box

@property
coords = (source)

The coordinates of the corners.

The coordinates are returned as a 4-tuple in the following order: left edge, top edge, right edge, bottom edge.

@property
left = (source)

The X coordinate of the left side of the box

@property
midx = (source)

The X coordinate of the center of the box

@property
midy = (source)

The Y coordinate of the center of the box

@property
right = (source)

The X coordinate of the right side of the box

@property
shape = (source)

The shape of the rectangle (width, height)

@property
top = (source)

The Y coordinate of the top edge of the box

_bottom = (source)
overridden in `igraph.drawing.utils.BoundingBox`

Undocumented

_left = (source)
overridden in `igraph.drawing.utils.BoundingBox`

Undocumented

_right = (source)
overridden in `igraph.drawing.utils.BoundingBox`

Undocumented

_top = (source)
overridden in `igraph.drawing.utils.BoundingBox`

Undocumented