Commit 8f1141b
committed
Make annotate/OffsetFrom unaffected by later mutation of coordinates.
The unpacking (`x, y = xy`) is safe wrt. units (we already perform the
same unpacking later when actually computing coordinates) and prevents
later mutation of the input array from affecting the artist (or the
OffsetFrom instance), which is consistent with other artists.
While at it, also inline OffsetFrom._get_scale, which is a one-liner.1 parent 5140177 commit 8f1141b
2 files changed
+23
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | | - | |
| 1392 | + | |
| 1393 | + | |
1393 | 1394 | | |
1394 | 1395 | | |
1395 | 1396 | | |
| |||
1407 | 1408 | | |
1408 | 1409 | | |
1409 | 1410 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | 1411 | | |
1418 | 1412 | | |
1419 | 1413 | | |
| |||
1443 | 1437 | | |
1444 | 1438 | | |
1445 | 1439 | | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
| 1440 | + | |
| 1441 | + | |
1451 | 1442 | | |
1452 | 1443 | | |
1453 | 1444 | | |
| |||
1456 | 1447 | | |
1457 | 1448 | | |
1458 | 1449 | | |
1459 | | - | |
| 1450 | + | |
| 1451 | + | |
1460 | 1452 | | |
1461 | 1453 | | |
1462 | 1454 | | |
| |||
0 commit comments