Lines Matching defs:Transform

3 The Transform class implements various transformation matrix operations,
6 Transform instances are effectively immutable: all methods that operate on the
8 interesting side effect that Transform instances are hashable, ie. they can be
13 Transform -- this is the main class
14 Identity -- Transform instance set to the identity transformation
20 >>> t = Transform(2, 0, 0, 3, 0, 0)
51 __all__ = ["Transform", "Identity", "Offset", "Scale"]
69 class Transform(object):
72 Transform instances are immutable: all transforming methods, eg.
73 rotate(), return a new Transform instance.
76 >>> t = Transform()
78 <Transform [1 0 0 1 0 0]>
80 <Transform [2 0 0 2 0 0]>
82 <Transform [2.5 0.0 0.0 5.5 0 0]>
89 """Transform's constructor takes six arguments, all of which are
91 >>> Transform(12)
92 <Transform [12 0 0 1 0 0]>
93 >>> Transform(dx=12)
94 <Transform [1 0 0 1 12 0]>
95 >>> Transform(yx=12)
96 <Transform [1 0 12 1 0 0]>
102 """Transform a point.
105 >>> t = Transform()
115 """Transform a list of points.
130 >>> t = Transform()
132 <Transform [1 0 0 1 20 30]>
142 >>> t = Transform()
144 <Transform [5 0 0 5 0 0]>
146 <Transform [5 0 0 6 0 0]>
158 >>> t = Transform()
160 <Transform [0 1 -1 0 0 0]>
173 >>> t = Transform()
175 <Transform [1.0 0.0 1.0 1.0 0 0]>
186 >>> t = Transform(2, 0, 0, 3, 1, 6)
188 <Transform [8 9 4 3 11 24]>
207 >>> t = Transform(2, 0, 0, 3, 1, 6)
209 <Transform [8 6 6 3 21 15]>
210 >>> Transform(4, 3, 2, 1, 5, 6).transform((2, 0, 0, 3, 1, 6))
211 <Transform [8 6 6 3 21 15]>
254 """Transform instances also behave like sequences of length 6:
262 """Transform instances also behave like sequences of length 6:
274 """Transform instances are comparable:
285 <Transform [0.2 0.0 0.0 0.3 0.08 0.18]>
287 <Transform [0.2 0.0 0.0 0.3 0.08 0.18]>
298 """Transform instances are hashable, meaning you can use them as
302 {<Transform [12 0 0 13 0 0]>: None}
309 <Transform [0.2 0.0 0.0 0.3 0.08 0.18]>
311 <Transform [0.2 0.0 0.0 0.3 0.08 0.18]>
314 {<Transform [0.2 0.0 0.0 0.3 0.08 0.18]>: None}
318 KeyError: <Transform [0.2 0.0 0.0 0.3 0.08 0.18]>
328 Identity = Transform()
335 <Transform [1 0 0 1 2 3]>
338 return Transform(1, 0, 0, 1, x, y)
346 <Transform [2 0 0 3 0 0]>
351 return Transform(x, 0, 0, y, 0, 0)