remove ambiguous except blocks
parent
413a2864f6
commit
e71d2d4282
|
@ -141,14 +141,11 @@ def split_bezier(bpoints, t):
|
||||||
|
|
||||||
|
|
||||||
def halve_bezier(p):
|
def halve_bezier(p):
|
||||||
|
"""split path segment into two halves at t=0.5"""
|
||||||
|
|
||||||
# begin arc support block ########################
|
# for Arc support
|
||||||
try:
|
if hasattr(p, 'radius'):
|
||||||
p.large_arc
|
|
||||||
return p.split(0.5)
|
return p.split(0.5)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# end arc support block ##########################
|
|
||||||
|
|
||||||
if len(p) == 4:
|
if len(p) == 4:
|
||||||
return ([p[0], (p[0] + p[1])/2, (p[0] + 2*p[1] + p[2])/4,
|
return ([p[0], (p[0] + p[1])/2, (p[0] + 2*p[1] + p[2])/4,
|
||||||
|
@ -195,13 +192,9 @@ def bezier_bounding_box(bez):
|
||||||
(xmin, xmax, ymin, ymax).
|
(xmin, xmax, ymin, ymax).
|
||||||
Warning: For the non-cubic case this is not particularly efficient."""
|
Warning: For the non-cubic case this is not particularly efficient."""
|
||||||
|
|
||||||
# begin arc support block ########################
|
# for Arc support
|
||||||
try:
|
if hasattr(bez, 'radius'):
|
||||||
bla = bez.large_arc
|
return bez.bbox()
|
||||||
return bez.bbox() # added to support Arc objects
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# end arc support block ##########################
|
|
||||||
|
|
||||||
if len(bez) == 4:
|
if len(bez) == 4:
|
||||||
xmin, xmax = bezier_real_minmax([p.real for p in bez])
|
xmin, xmax = bezier_real_minmax([p.real for p in bez])
|
||||||
|
|
Loading…
Reference in New Issue