@@ -1803,8 +1803,6 @@ def _pprint_styles(_styles):
1803
1803
(stylename : styleclass), return a formatted string listing all the
1804
1804
styles. Used to update the documentation.
1805
1805
"""
1806
- names , attrss , clss = [], [], []
1807
-
1808
1806
import inspect
1809
1807
1810
1808
_table = [["Class" , "Name" , "Attrs" ]]
@@ -3057,8 +3055,6 @@ def connect(self, posA, posB):
3057
3055
x1 , y1 = posA
3058
3056
x20 , y20 = x2 , y2 = posB
3059
3057
3060
- x12 , y12 = (x1 + x2 ) / 2. , (y1 + y2 ) / 2.
3061
-
3062
3058
theta1 = math .atan2 (y2 - y1 , x2 - x1 )
3063
3059
dx , dy = x2 - x1 , y2 - y1
3064
3060
dd = (dx * dx + dy * dy ) ** .5
@@ -3067,18 +3063,12 @@ def connect(self, posA, posB):
3067
3063
armA , armB = self .armA , self .armB
3068
3064
3069
3065
if self .angle is not None :
3070
- #angle = self.angle % 180.
3071
- #if angle < 0. or angle > 180.:
3072
- # angle
3073
- #theta0 = (self.angle%180.)/180.*math.pi
3074
3066
theta0 = self .angle / 180. * math .pi
3075
- #theta0 = (((self.angle+90)%180.) - 90.)/180.*math.pi
3076
3067
dtheta = theta1 - theta0
3077
- dl = dd * math .sin (dtheta )
3078
3068
3069
+ dl = dd * math .sin (dtheta )
3079
3070
dL = dd * math .cos (dtheta )
3080
3071
3081
- #x2, y2 = x2 + dl*ddy, y2 - dl*ddx
3082
3072
x2 , y2 = x1 + dL * math .cos (theta0 ), y1 + dL * math .sin (theta0 )
3083
3073
3084
3074
armB = armB - dl
@@ -3091,14 +3081,8 @@ def connect(self, posA, posB):
3091
3081
else :
3092
3082
dl = 0.
3093
3083
3094
- #if armA > armB:
3095
- # armB = armA + dl
3096
- #else:
3097
- # armA = armB - dl
3098
-
3099
3084
arm = max (armA , armB )
3100
3085
f = self .fraction * dd + arm
3101
- #fB = self.fraction*dd + armB
3102
3086
3103
3087
cx1 , cy1 = x1 + f * ddy , y1 - f * ddx
3104
3088
cx2 , cy2 = x2 + f * ddy , y2 - f * ddx
0 commit comments