@@ -130,8 +130,6 @@ def __init__(
130
130
self ._padding_left = padding_left
131
131
self ._padding_right = padding_right
132
132
133
- self ._scale = scale
134
-
135
133
if text is not None :
136
134
self ._update_text (str (text ))
137
135
if (anchored_position is not None ) and (anchor_point is not None ):
@@ -389,12 +387,11 @@ def text(self, new_text):
389
387
@property
390
388
def scale (self ):
391
389
"""Set the scaling of the label, in integer values"""
392
- return self ._scale
390
+ return self .local_group . scale
393
391
394
392
@scale .setter
395
393
def scale (self , new_scale ):
396
394
current_anchored_position = self .anchored_position
397
- self ._scale = new_scale
398
395
self .local_group .scale = new_scale
399
396
self .anchored_position = current_anchored_position
400
397
@@ -438,13 +435,13 @@ def anchored_position(self):
438
435
return (
439
436
int (
440
437
self .x
441
- + (self ._boundingbox [0 ] * self ._scale )
442
- + round (self ._anchor_point [0 ] * self ._boundingbox [2 ] * self ._scale )
438
+ + (self ._boundingbox [0 ] * self .scale )
439
+ + round (self ._anchor_point [0 ] * self ._boundingbox [2 ] * self .scale )
443
440
),
444
441
int (
445
442
self .y
446
- + (self ._boundingbox [1 ] * self ._scale )
447
- + round (self ._anchor_point [1 ] * self ._boundingbox [3 ] * self ._scale )
443
+ + (self ._boundingbox [1 ] * self .scale )
444
+ + round (self ._anchor_point [1 ] * self ._boundingbox [3 ] * self .scale )
448
445
),
449
446
)
450
447
@@ -454,11 +451,11 @@ def anchored_position(self, new_position):
454
451
return # Note: anchor_point must be set before setting anchored_position
455
452
self .x = int (
456
453
new_position [0 ]
457
- - (self ._boundingbox [0 ] * self ._scale )
458
- - round (self ._anchor_point [0 ] * (self ._boundingbox [2 ] * self ._scale ))
454
+ - (self ._boundingbox [0 ] * self .scale )
455
+ - round (self ._anchor_point [0 ] * (self ._boundingbox [2 ] * self .scale ))
459
456
)
460
457
self .y = int (
461
458
new_position [1 ]
462
- - (self ._boundingbox [1 ] * self ._scale )
463
- - round (self ._anchor_point [1 ] * self ._boundingbox [3 ] * self ._scale )
459
+ - (self ._boundingbox [1 ] * self .scale )
460
+ - round (self ._anchor_point [1 ] * self ._boundingbox [3 ] * self .scale )
464
461
)
0 commit comments