@@ -139,20 +139,20 @@ def scaledBoundingRect(self, sx, sy, scalePens):
139139 rect = transform .mapRect (self .__boundingRect )
140140 else :
141141 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 )
147147 return rect
148148
149149 def scaleFactorX (self , pathRect , targetRect , scalePens ):
150150 if pathRect .width () <= 0.0 :
151151 return 0.0
152152 p0 = self .__pointRect .center ()
153- l = abs (pathRect .left () - p0 .x ())
153+ left_diff = abs (pathRect .left () - p0 .x ())
154154 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 ()
156156 if scalePens and self .__scalablePen :
157157 sx = w / self .__boundingRect .width ()
158158 else :
0 commit comments