| |
- __builtin__.object
-
- TransformNode
-
- BboxBase
-
- Bbox
- TransformedBbox
- Transform
-
- AffineBase
-
- Affine2DBase
-
- Affine2D
- BboxTransform
- BboxTransformFrom
- BboxTransformTo
- BlendedAffine2D
- CompositeAffine2D
- IdentityTransform
- ScaledTranslation
- BlendedGenericTransform
- CompositeGenericTransform
- TransformWrapper
- TransformedPath
class Affine2D(Affine2DBase) |
| |
- Method resolution order:
- Affine2D
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __cmp__(self, other)
- __init__(self, matrix=None)
- Initialize an Affine transform from a 3x3 numpy float array:
a c e
b d f
0 0 1
If matrix is None, initialize with the identity transform.
- __repr__(self)
- __str__ = __repr__(self)
- clear(self)
- Reset the underlying matrix to the identity transform.
- get_matrix(self)
- Get the underlying transformation matrix as a 3x3 numpy array:
a c e
b d f
0 0 1
- rotate(self, theta)
- Add a rotation (in radians) to this transform in place.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
- rotate_around(self, x, y, theta)
- Add a rotation (in radians) around the point (x, y) in place.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
- rotate_deg(self, degrees)
- Add a rotation (in degrees) to this transform in place.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
- rotate_deg_around(self, x, y, degrees)
- Add a rotation (in degrees) around the point (x, y) in place.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
- scale(self, sx, sy=None)
- Adds a scale in place.
If sy is None, the same scale is applied in both the x- and
y-directions.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
- set(self, other)
- Set this transformation from the frozen copy of another
Affine2DBase instance.
- set_matrix(self, mtx)
- Set the underlying transformation matrix from a 3x3 numpy array:
a c e
b d f
0 0 1
- translate(self, tx, ty)
- Adds a translation in place.
Returns self, so this method can easily be chained with more
calls to rotate(), rotate_deg(), translate() and scale().
Static methods defined here:
- from_values(a, b, c, d, e, f)
- Create a new Affine2D instance from the given values:
a c e
b d f
0 0 1
- identity()
- Return a new Affine2D instance that is the identity transform.
Unless this transform will be mutated later on, consider using
the faster IdentityTransform class instead.
Data descriptors defined here:
- is_separable
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class Affine2DBase(AffineBase) |
|
The base class of all 2D affine transformations.
2D affine transformations are performed using a 3x3 numpy array:
a c e
b d f
0 0 1
Provides the read-only interface.
Subclasses of this class will generally only need to override a
constructor and 'get_matrix' that generates a custom 3x3 matrix. |
|
- Method resolution order:
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- transform_point(self, point)
Static methods defined here:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data descriptors defined here:
- is_separable
Data and other attributes defined here:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- __init__(self)
- get_affine(self)
- Get the affine part of this transform.
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class AffineBase(Transform) |
|
The base class of all affine transformations of any number of
dimensions. |
|
- Method resolution order:
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __array__(self, *args, **kwargs)
- __init__(self)
- get_affine(self)
- Get the affine part of this transform.
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes defined here:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- transform(self, values)
- Performs the transformation on the given array of values.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine(self, values)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
- transform_point(self, point)
- A convenience function that returns the transformed copy of a
single point.
The point is given as a sequence of length self.input_dims.
The transformed point is returned as a sequence of length
self.output_dims.
Data and other attributes inherited from Transform:
- has_inverse = False
- input_dims = None
- is_separable = False
- output_dims = None
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class Bbox(BboxBase) |
| |
- Method resolution order:
- Bbox
- BboxBase
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, points)
- Create a new bounding box.
points: a 2x2 numpy array of the form [[x0, y0], [x1, y1]]
If you need to create Bbox from another form of data, consider the
class methods unit, from_bounds and from_extents.
- __repr__(self)
- __str__ = __repr__(self)
- get_points(self)
- Set the points of the bounding box directly as a numpy array
of the form: [[x0, y0], [x1, y1]].
- ignore(self, value)
- Set whether the existing bounds of the box should be ignored
by subsequent calls to update_from_data or
update_from_data_xy.
value: When True, subsequent calls to update_from_data will
ignore the existing bounds of the Bbox.
When False, subsequent calls to update_from_data will
include the existing bounds of the Bbox.
- set(self, other)
- Set this bounding box from the "frozen" bounds of another Bbox.
- set_points(self, points)
- Set the points of the bounding box directly from a numpy array
of the form: [[x0, y0], [x1, y1]]. No error checking
is performed, as this method is mainly for internal use.
- update_from_data(self, x, y, ignore=None)
- Update the bounds of the Bbox based on the passed in data.
x: a numpy array of x-values
y: a numpy array of y-values
ignore:
when True, ignore the existing bounds of the Bbox.
when False, include the existing bounds of the Bbox.
when None, use the last value passed to Bbox.ignore().
- update_from_data_xy(self, xy, ignore=None)
- Update the bounds of the Bbox based on the passed in data.
xy: a numpy array of 2D points
ignore:
when True, ignore the existing bounds of the Bbox.
when False, include the existing bounds of the Bbox.
when None, use the last value passed to Bbox.ignore().
Static methods defined here:
- from_bounds(x0, y0, width, height)
- Create a new Bbox from x0, y0, width and height.
width and height may be negative.
- from_extents(*args)
- Create a new Bbox from left, bottom, right and top.
The y-axis increases upwards.
- unit()
- Create a new unit BBox from (0, 0) to (1, 1).
Data descriptors defined here:
- bounds
- intervalx
- intervaly
- minpos
- minposx
- minposy
- p0
- p1
- x0
- x1
- y0
- y1
Methods inherited from BboxBase:
- __array__(self, *args, **kwargs)
- anchored(self, c, container=None)
- Return a copy of the Bbox, shifted to position c within a
container.
c: may be either a) a sequence (cx, cy) where cx, cy range
from 0 to 1, where 0 is left or bottom and 1 is right or top;
or b) a string: C for centered, S for bottom-center, SE for
bottom-left, E for left, etc.
Optional arg container is the box within which the BBox
is positioned; it defaults to the initial BBox.
- contains(self, x, y)
- containsx(self, x)
- containsy(self, y)
- corners(self)
- Return an array of points which are the four corners of this
rectangle.
- count_contains(self, vertices)
- Count the number of vertices contained in the Bbox.
vertices is a Nx2 numpy array.
- count_overlaps(self, bboxes)
- Count the number of bounding boxes that overlap this one.
bboxes is a sequence of Bbox objects
- expanded(self, sw, sh)
- Return a new Bbox which is this Bbox expanded around its
center by the given factors sw and sh.
- frozen(self)
- TransformNode is the base class for anything that participates in
the transform tree and needs to invalidate its parents or be
invalidated. It can include classes that are not technically
transforms, such as bounding boxes, since some transforms depend
on bounding boxes to compute their values.
- fully_contains(self, x, y)
- fully_containsx(self, x)
- fully_containsy(self, y)
- fully_overlaps(self, other)
- inverse_transformed(self, transform)
- Return a new Bbox object, transformed by the inverse of the
given transform.
- is_unit(self)
- overlaps(self, other)
- padded(self, p)
- Return a new Bbox that is padded on all four sides by the
given value.
- rotated(self, radians)
- Return a new bounding box that bounds a rotated version of this
bounding box. The new bounding box is still aligned with the
axes, of course.
- shrunk(self, mx, my)
- Return a copy of the Bbox, shurnk by the factor mx in the x
direction and the factor my in the y direction. The lower
left corner of the box remains unchanged. Normally mx and my
will be <= 1, but this is not enforced.
- shrunk_to_aspect(self, box_aspect, container=None, fig_aspect=1.0)
- Return a copy of the Bbox, shrunk so that it is as large as it
can be while having the desired aspect ratio, box_aspect. If
the box coordinates are relative--that is, fractions of a
larger box such as a figure--then the physical aspect ratio of
that figure is specified with fig_aspect, so that box_aspect
can also be given as a ratio of the absolute dimensions, not
the relative dimensions.
- splitx(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new BBoxes formed by
splitting the original one with vertical lines
at fractional positions f1, f2, ...
- splity(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new PBoxes formed by
splitting the original one with horizontal lines
at fractional positions f1, f2, ...
- transformed(self, transform)
- Return a new Bbox object, transformed by the given transform.
- translated(self, tx, ty)
- Return a copy of the Bbox, translated by tx and ty.
Static methods inherited from BboxBase:
- union(bboxes)
- Return a Bbox that contains all of the given bboxes.
Data descriptors inherited from BboxBase:
- extents
- height
- max
- min
- size
- width
- xmax
- xmin
- ymax
- ymin
Data and other attributes inherited from BboxBase:
- coefs = {'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)}
- is_affine = True
- is_bbox = True
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- pass_through = False
|
class BboxBase(TransformNode) |
|
This is the base class of all bounding boxes, and provides
read-only access to its data. |
|
- Method resolution order:
- BboxBase
- TransformNode
- __builtin__.object
Methods defined here:
- __array__(self, *args, **kwargs)
- anchored(self, c, container=None)
- Return a copy of the Bbox, shifted to position c within a
container.
c: may be either a) a sequence (cx, cy) where cx, cy range
from 0 to 1, where 0 is left or bottom and 1 is right or top;
or b) a string: C for centered, S for bottom-center, SE for
bottom-left, E for left, etc.
Optional arg container is the box within which the BBox
is positioned; it defaults to the initial BBox.
- contains(self, x, y)
- containsx(self, x)
- containsy(self, y)
- corners(self)
- Return an array of points which are the four corners of this
rectangle.
- count_contains(self, vertices)
- Count the number of vertices contained in the Bbox.
vertices is a Nx2 numpy array.
- count_overlaps(self, bboxes)
- Count the number of bounding boxes that overlap this one.
bboxes is a sequence of Bbox objects
- expanded(self, sw, sh)
- Return a new Bbox which is this Bbox expanded around its
center by the given factors sw and sh.
- frozen(self)
- TransformNode is the base class for anything that participates in
the transform tree and needs to invalidate its parents or be
invalidated. It can include classes that are not technically
transforms, such as bounding boxes, since some transforms depend
on bounding boxes to compute their values.
- fully_contains(self, x, y)
- fully_containsx(self, x)
- fully_containsy(self, y)
- fully_overlaps(self, other)
- get_points(self)
- inverse_transformed(self, transform)
- Return a new Bbox object, transformed by the inverse of the
given transform.
- is_unit(self)
- overlaps(self, other)
- padded(self, p)
- Return a new Bbox that is padded on all four sides by the
given value.
- rotated(self, radians)
- Return a new bounding box that bounds a rotated version of this
bounding box. The new bounding box is still aligned with the
axes, of course.
- shrunk(self, mx, my)
- Return a copy of the Bbox, shurnk by the factor mx in the x
direction and the factor my in the y direction. The lower
left corner of the box remains unchanged. Normally mx and my
will be <= 1, but this is not enforced.
- shrunk_to_aspect(self, box_aspect, container=None, fig_aspect=1.0)
- Return a copy of the Bbox, shrunk so that it is as large as it
can be while having the desired aspect ratio, box_aspect. If
the box coordinates are relative--that is, fractions of a
larger box such as a figure--then the physical aspect ratio of
that figure is specified with fig_aspect, so that box_aspect
can also be given as a ratio of the absolute dimensions, not
the relative dimensions.
- splitx(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new BBoxes formed by
splitting the original one with vertical lines
at fractional positions f1, f2, ...
- splity(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new PBoxes formed by
splitting the original one with horizontal lines
at fractional positions f1, f2, ...
- transformed(self, transform)
- Return a new Bbox object, transformed by the given transform.
- translated(self, tx, ty)
- Return a copy of the Bbox, translated by tx and ty.
Static methods defined here:
- union(bboxes)
- Return a Bbox that contains all of the given bboxes.
Data descriptors defined here:
- bounds
- extents
- height
- intervalx
- intervaly
- max
- min
- p0
- p1
- size
- width
- x0
- x1
- xmax
- xmin
- y0
- y1
- ymax
- ymin
Data and other attributes defined here:
- coefs = {'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)}
- is_affine = True
- is_bbox = True
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- __init__(self)
- Creates a new TransformNode.
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- pass_through = False
|
class BboxTransform(Affine2DBase) |
|
BboxTransform linearly transforms points from one Bbox to another Bbox. |
|
- Method resolution order:
- BboxTransform
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, boxin, boxout)
- Create a new BboxTransform that linearly transforms points
from boxin to boxout.
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Data and other attributes defined here:
- is_separable = True
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class BboxTransformFrom(Affine2DBase) |
|
BboxTransform linearly transforms points from one Bbox to the unit
Bbox. |
|
- Method resolution order:
- BboxTransformFrom
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, boxin)
- Create a new BboxTransform that linearly transforms points
from boxin to the unit Bbox.
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Data and other attributes defined here:
- is_separable = True
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class BboxTransformTo(Affine2DBase) |
|
BboxTransformSimple linearly transforms points from the unit Bbox
to another Bbox. |
|
- Method resolution order:
- BboxTransformTo
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, boxout)
- Create a new BboxTransform that linearly transforms points
from the unit Bbox to boxout.
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Data and other attributes defined here:
- is_separable = True
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class BlendedAffine2D(Affine2DBase) |
|
A "blended" transform uses one transform for the x-direction, and
another transform for the y-direction.
This version is an optimization for the case where both child
transforms are of type Affine2DBase. |
|
- Method resolution order:
- BlendedAffine2D
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, x_transform, y_transform)
- Create a new "blended" transform using x_transform to
transform the x-axis and y_transform to transform the y_axis.
Both x_transform and y_transform must be 2D affine transforms.
You will generally not call this constructor directly but use
the blended_transform_factory function instead, which can
determine automatically which kind of blended transform to
create.
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Data and other attributes defined here:
- is_separable = True
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class BlendedGenericTransform(Transform) |
|
A "blended" transform uses one transform for the x-direction, and
another transform for the y-direction.
This "generic" version can handle any given child transform in the
x- and y-directions. |
|
- Method resolution order:
- BlendedGenericTransform
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, x_transform, y_transform)
- Create a new "blended" transform using x_transform to
transform the x-axis and y_transform to transform the y_axis.
You will generally not call this constructor directly but use
the blended_transform_factory function instead, which can
determine automatically which kind of blended transform to
create.
- __repr__(self)
- __str__ = __repr__(self)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- get_affine(self)
- Get the affine part of this transform.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- transform(self, points)
- Performs the transformation on the given array of values.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
Data descriptors defined here:
- is_affine
Data and other attributes defined here:
- input_dims = 2
- is_separable = True
- output_dims = 2
- pass_through = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __array__(self, *args, **kwargs)
- Used by C/C++ -based backends to get at the array matrix data.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_point(self, point)
- A convenience function that returns the transformed copy of a
single point.
The point is given as a sequence of length self.input_dims.
The transformed point is returned as a sequence of length
self.output_dims.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
|
class CompositeAffine2D(Affine2DBase) |
|
A composite transform formed by applying transform a then transform b.
This version is an optimization that handles the case where both a
and b are 2D affines. |
|
- Method resolution order:
- CompositeAffine2D
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, a, b)
- Create a new composite transform that is the result of
applying transform a then transform b.
Both a and b must be instances of Affine2DBase.
You will generally not call this constructor directly but use
the composite_transform_factory function instead, which can
automatically choose the best kind of composite transform
instance to create.
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data descriptors inherited from Affine2DBase:
- is_separable
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class CompositeGenericTransform(Transform) |
|
A composite transform formed by applying transform a then transform b.
This "generic" version can handle any two arbitrary transformations. |
|
- Method resolution order:
- CompositeGenericTransform
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, a, b)
- Create a new composite transform that is the result of
applying transform a then transform b.
You will generally not call this constructor directly but use
the composite_transform_factory function instead, which can
automatically choose the best kind of composite transform
instance to create.
- __repr__(self)
- __str__ = __repr__(self)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- get_affine(self)
- Get the affine part of this transform.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- transform(self, points)
- Performs the transformation on the given array of values.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data descriptors defined here:
- is_affine
- is_separable
Data and other attributes defined here:
- pass_through = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __array__(self, *args, **kwargs)
- Used by C/C++ -based backends to get at the array matrix data.
- __radd__(self, other)
- transform_point(self, point)
- A convenience function that returns the transformed copy of a
single point.
The point is given as a sequence of length self.input_dims.
The transformed point is returned as a sequence of length
self.output_dims.
Data and other attributes inherited from Transform:
- has_inverse = False
- input_dims = None
- output_dims = None
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
|
class IdentityTransform(Affine2DBase) |
|
A special class that does on thing, the identity transform, in a
fast way. |
|
- Method resolution order:
- IdentityTransform
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __repr__(self)
- __str__ = __repr__(self)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- get_affine(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
- inverted = get_affine(self)
- transform(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- transform_non_affine = transform(self, points)
- transform_path(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_affine = transform_path(self, path)
- transform_path_non_affine = transform_path(self, path)
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data descriptors inherited from Affine2DBase:
- is_separable
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- __init__(self)
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class ScaledTranslation(Affine2DBase) |
| |
- Method resolution order:
- ScaledTranslation
- Affine2DBase
- AffineBase
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, xt, yt, scale_trans)
- __repr__(self)
- __str__ = __repr__(self)
- get_matrix(self)
- Get the underlying transformation matrix as a numpy array.
Methods inherited from Affine2DBase:
- __array__(self, *args, **kwargs)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- to_values(self)
- Return the values of the matrix as a sequence (a,b,c,d,e,f)
- transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine = transform(self, points)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_point(self, point)
Static methods inherited from Affine2DBase:
- matrix_from_values(a, b, c, d, e, f)
- Create a new transformation matrix as a 3x3 numpy array of the form:
a c e
b d f
0 0 1
Data descriptors inherited from Affine2DBase:
- is_separable
Data and other attributes inherited from Affine2DBase:
- input_dims = 2
- output_dims = 2
Methods inherited from AffineBase:
- get_affine(self)
- Get the affine part of this transform.
- transform_non_affine(self, points)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
Data and other attributes inherited from AffineBase:
- is_affine = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __radd__(self, other)
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
Data and other attributes inherited from Transform:
- has_inverse = False
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
- pass_through = False
|
class Transform(TransformNode) |
|
The base class of all TransformNodes that actually perform a
transformation.
All non-affine transformations should be subclass this class. New
affine transformations should subclass Affine2D.
Subclasses of this class should override the following members (at
minimum):
input_dims
output_dims
transform
is_separable
has_inverse
inverted (if has_inverse will return True)
If the transform needs to do something non-standard with Paths,
such as adding curves where there were once line segments, it
should override:
transform_path |
|
- Method resolution order:
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __array__(self, *args, **kwargs)
- Used by C/C++ -based backends to get at the array matrix data.
- __radd__(self, other)
- get_affine(self)
- Get the affine part of this transform.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- transform(self, values)
- Performs the transformation on the given array of values.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine(self, values)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_non_affine(self, values)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_point(self, point)
- A convenience function that returns the transformed copy of a
single point.
The point is given as a sequence of length self.input_dims.
The transformed point is returned as a sequence of length
self.output_dims.
Data and other attributes defined here:
- has_inverse = False
- input_dims = None
- is_separable = False
- output_dims = None
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- __init__(self)
- Creates a new TransformNode.
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_affine = False
- is_bbox = False
- pass_through = False
|
class TransformNode(__builtin__.object) |
|
TransformNode is the base class for anything that participates in
the transform tree and needs to invalidate its parents or be
invalidated. It can include classes that are not technically
transforms, such as bounding boxes, since some transforms depend
on bounding boxes to compute their values. |
|
Methods defined here:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- __init__(self)
- Creates a new TransformNode.
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_affine = False
- is_bbox = False
- pass_through = False
|
class TransformWrapper(Transform) |
|
A helper class that holds a single child transform and acts
equivalently to it.
This is useful if a node of the transform tree must be replaced at
run time with a transform of a different type. This class allows
that replacement to correctly trigger invalidation.
Note that TransformWrapper instances must have the same input and
output dimensions during their entire lifetime, so the child
transform may only be replaced with another child transform of the
same dimensions. |
|
- Method resolution order:
- TransformWrapper
- Transform
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, child)
- child: A Transform instance. This child may later be replaced
with set().
- __repr__(self)
- __str__ = __repr__(self)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- set(self, child)
- Replace the current child of this transform with another one.
The new child must have the same number of input and output
dimensions as the current child.
Data descriptors defined here:
- has_inverse
- is_affine
- is_separable
Data and other attributes defined here:
- pass_through = True
Methods inherited from Transform:
- __add__(self, other)
- Composes two transforms together such that self is followed by other.
- __array__(self, *args, **kwargs)
- Used by C/C++ -based backends to get at the array matrix data.
- __radd__(self, other)
- get_affine(self)
- Get the affine part of this transform.
- inverted(self)
- Return the corresponding inverse transformation.
The return value of this method should be treated as
temporary. An update to 'self' does not cause a corresponding
update to its inverted copy.
x === inverted().transform(transform(x))
- transform(self, values)
- Performs the transformation on the given array of values.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_affine(self, values)
- Performs only the affine part of this transformation on the
given array of values.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally a no-op. In
affine transformations, this is equivalent to
transform(values).
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_non_affine(self, values)
- Performs only the non-affine part of the transformation.
transform(values) is equivalent to
transform_affine(transform_non_affine(values)).
In non-affine transformations, this is generally equivalent to
transform(values). In affine transformations, this is a
no-op.
Accepts a numpy array of shape (N x self.input_dims) and
returns a numpy array of shape (N x self.output_dims).
- transform_path(self, path)
- Returns a transformed copy of path.
path: a Path instance.
In some cases, this transform may insert curves into the path
that began as line segments.
- transform_path_affine(self, path)
- Returns a copy of path, transformed only by the affine part of
this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_path_non_affine(self, path)
- Returns a copy of path, transformed only by the non-affine
part of this transform.
path: a Path instance
transform_path(path) is equivalent to
transform_path_affine(transform_path_non_affine(values)).
- transform_point(self, point)
- A convenience function that returns the transformed copy of a
single point.
The point is given as a sequence of length self.input_dims.
The transformed point is returned as a sequence of length
self.output_dims.
Data and other attributes inherited from Transform:
- input_dims = None
- output_dims = None
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_bbox = False
|
class TransformedBbox(BboxBase) |
|
A Bbox that is automatically transformed by a given Transform. When
either the child bbox or transform changes, the bounds of this bbox
will update accordingly. |
|
- Method resolution order:
- TransformedBbox
- BboxBase
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, bbox, transform)
- bbox: a child bbox
transform: a 2D transform
- __repr__(self)
- __str__ = __repr__(self)
- get_points(self)
Methods inherited from BboxBase:
- __array__(self, *args, **kwargs)
- anchored(self, c, container=None)
- Return a copy of the Bbox, shifted to position c within a
container.
c: may be either a) a sequence (cx, cy) where cx, cy range
from 0 to 1, where 0 is left or bottom and 1 is right or top;
or b) a string: C for centered, S for bottom-center, SE for
bottom-left, E for left, etc.
Optional arg container is the box within which the BBox
is positioned; it defaults to the initial BBox.
- contains(self, x, y)
- containsx(self, x)
- containsy(self, y)
- corners(self)
- Return an array of points which are the four corners of this
rectangle.
- count_contains(self, vertices)
- Count the number of vertices contained in the Bbox.
vertices is a Nx2 numpy array.
- count_overlaps(self, bboxes)
- Count the number of bounding boxes that overlap this one.
bboxes is a sequence of Bbox objects
- expanded(self, sw, sh)
- Return a new Bbox which is this Bbox expanded around its
center by the given factors sw and sh.
- frozen(self)
- TransformNode is the base class for anything that participates in
the transform tree and needs to invalidate its parents or be
invalidated. It can include classes that are not technically
transforms, such as bounding boxes, since some transforms depend
on bounding boxes to compute their values.
- fully_contains(self, x, y)
- fully_containsx(self, x)
- fully_containsy(self, y)
- fully_overlaps(self, other)
- inverse_transformed(self, transform)
- Return a new Bbox object, transformed by the inverse of the
given transform.
- is_unit(self)
- overlaps(self, other)
- padded(self, p)
- Return a new Bbox that is padded on all four sides by the
given value.
- rotated(self, radians)
- Return a new bounding box that bounds a rotated version of this
bounding box. The new bounding box is still aligned with the
axes, of course.
- shrunk(self, mx, my)
- Return a copy of the Bbox, shurnk by the factor mx in the x
direction and the factor my in the y direction. The lower
left corner of the box remains unchanged. Normally mx and my
will be <= 1, but this is not enforced.
- shrunk_to_aspect(self, box_aspect, container=None, fig_aspect=1.0)
- Return a copy of the Bbox, shrunk so that it is as large as it
can be while having the desired aspect ratio, box_aspect. If
the box coordinates are relative--that is, fractions of a
larger box such as a figure--then the physical aspect ratio of
that figure is specified with fig_aspect, so that box_aspect
can also be given as a ratio of the absolute dimensions, not
the relative dimensions.
- splitx(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new BBoxes formed by
splitting the original one with vertical lines
at fractional positions f1, f2, ...
- splity(self, *args)
- e.g., bbox.splitx(f1, f2, ...)
Returns a list of new PBoxes formed by
splitting the original one with horizontal lines
at fractional positions f1, f2, ...
- transformed(self, transform)
- Return a new Bbox object, transformed by the given transform.
- translated(self, tx, ty)
- Return a copy of the Bbox, translated by tx and ty.
Static methods inherited from BboxBase:
- union(bboxes)
- Return a Bbox that contains all of the given bboxes.
Data descriptors inherited from BboxBase:
- bounds
- extents
- height
- intervalx
- intervaly
- max
- min
- p0
- p1
- size
- width
- x0
- x1
- xmax
- xmin
- y0
- y1
- ymax
- ymin
Data and other attributes inherited from BboxBase:
- coefs = {'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)}
- is_affine = True
- is_bbox = True
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- pass_through = False
|
class TransformedPath(TransformNode) |
|
A TransformedPath caches a non-affine transformed copy of the
path. This cached copy is automatically updated when the
non-affine part of the transform changes. |
|
- Method resolution order:
- TransformedPath
- TransformNode
- __builtin__.object
Methods defined here:
- __init__(self, path, transform)
- Create a new TransformedPath from the given path and transform.
- get_affine(self)
- get_fully_transformed_path(self)
- Return a fully-transformed copy of the child path.
- get_transformed_path_and_affine(self)
- Return a copy of the child path, with the non-affine part of
the transform already applied, along with the affine part of
the path necessary to complete the transformation.
Methods inherited from TransformNode:
- __copy__(self, *args)
- __deepcopy__ = __copy__(self, *args)
- frozen(self)
- Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
a previously known state of a transform where copy.deepcopy()
might normally be used.
- invalidate(self)
- Invalidate this transform node and all of its parents. Should
be called anytime the transform changes.
- set_children(self, *children)
- Set the children of the transform. Should be called from the
constructor of any transforms that depend on other transforms.
- write_graphviz(self, fobj, highlight=[])
Data descriptors inherited from TransformNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from TransformNode:
- INVALID = 3
- INVALID_AFFINE = 2
- INVALID_NON_AFFINE = 1
- is_affine = False
- is_bbox = False
- pass_through = False
| |