@@ -139,20 +139,20 @@ def scaledBoundingRect(self, sx, sy, scalePens):
139
139
rect = transform .mapRect (self .__boundingRect )
140
140
else :
141
141
rect = transform .mapRect (self .__pointRect )
142
- l = abs (self .__pointRect .left () - self .__boundingRect .left ())
143
- r = abs (self .__pointRect .right () - self .__boundingRect .right ())
144
- t = abs (self .__pointRect .top () - self .__boundingRect .top ())
145
- b = abs (self .__pointRect .bottom () - self .__boundingRect .bottom ())
146
- rect .adjust (- l , - t , r , b )
142
+ left_diff = abs (self .__pointRect .left () - self .__boundingRect .left ())
143
+ right_diff = abs (self .__pointRect .right () - self .__boundingRect .right ())
144
+ top_diff = abs (self .__pointRect .top () - self .__boundingRect .top ())
145
+ bottom_diff = abs (self .__pointRect .bottom () - self .__boundingRect .bottom ())
146
+ rect .adjust (- left_diff , - top_diff , right_diff , bottom_diff )
147
147
return rect
148
148
149
149
def scaleFactorX (self , pathRect , targetRect , scalePens ):
150
150
if pathRect .width () <= 0.0 :
151
151
return 0.0
152
152
p0 = self .__pointRect .center ()
153
- l = abs (pathRect .left () - p0 .x ())
153
+ left_diff = abs (pathRect .left () - p0 .x ())
154
154
r = abs (pathRect .right () - p0 .x ())
155
- w = 2.0 * min ([l , r ]) * targetRect .width () / pathRect .width ()
155
+ w = 2.0 * min ([left_diff , r ]) * targetRect .width () / pathRect .width ()
156
156
if scalePens and self .__scalablePen :
157
157
sx = w / self .__boundingRect .width ()
158
158
else :
0 commit comments