@@ -1103,8 +1103,9 @@ def _iter_break_from_left_to_right(self):
1103
1103
right recursively. If self == ((A, N), A) then the result will be an
1104
1104
iterator which yields I : ((A, N), A), followed by A : (N, A),
1105
1105
followed by (A, N) : (A), but not ((A, N), A) : I.
1106
- This is equivalent to flattening the stack then slicing it with
1107
- ``flat_stack[i:]`` where i starts at 0 and ends at -1.
1106
+
1107
+ This is equivalent to flattening the stack then yielding
1108
+ ``flat_stack[:i], flat_stack[i:]`` where i=0..(n-1).
1108
1109
1109
1110
"""
1110
1111
yield IdentityTransform (), self
@@ -1136,11 +1137,12 @@ def __sub__(self, other):
1136
1137
1137
1138
# sometimes, when A contains the tree B there is no need to descend all the way down
1138
1139
# to the base of A (via B), instead we can just stop at B.
1139
- (A, B) - (B)-1 == A
1140
1140
1141
+ (A + B) - (B)^-1 == A
1142
+
1141
1143
# similarly, when B contains tree A, we can avoid decending A at all, basically:
1142
- A - B == (B - A).inverted() or B-1
1143
-
1144
+ A - (A + B) == ((B + A) - A).inverted() or B^ -1
1145
+
1144
1146
For clarity, the result of ``(A + B) - B + B == (A + B)``.
1145
1147
1146
1148
"""
@@ -1171,11 +1173,7 @@ def __array__(self, *args, **kwargs):
1171
1173
"""
1172
1174
Array interface to get at this Transform's matrix.
1173
1175
"""
1174
- # note, this method is also used by C/C++ -based backends
1175
- if self .is_affine :
1176
- return self .get_matrix ()
1177
- else :
1178
- raise ValueError ('Cannot convert this transform to an array.' )
1176
+ raise NotImplementedError ()
1179
1177
1180
1178
def transform (self , values ):
1181
1179
"""
@@ -1870,10 +1868,6 @@ def __repr__(self):
1870
1868
return "BlendedGenericTransform(%s,%s)" % (self ._x , self ._y )
1871
1869
__str__ = __repr__
1872
1870
1873
- def transform_affine (self , points ):
1874
- return self .get_affine ().transform (points )
1875
- transform_affine .__doc__ = Transform .transform_affine .__doc__
1876
-
1877
1871
def transform_non_affine (self , points ):
1878
1872
if self ._x .is_affine and self ._y .is_affine :
1879
1873
return points
@@ -2092,10 +2086,6 @@ def transform_non_affine(self, points):
2092
2086
self ._a .transform (points ))
2093
2087
transform_non_affine .__doc__ = Transform .transform_non_affine .__doc__
2094
2088
2095
- def transform_path_affine (self , path ):
2096
- return self .get_affine ().transform_path_affine (path )
2097
- transform_path_affine .__doc__ = Transform .transform_path_affine .__doc__
2098
-
2099
2089
def transform_path_non_affine (self , path ):
2100
2090
if self ._a .is_affine and self ._b .is_affine :
2101
2091
return path
0 commit comments