Commit d79dfaa
committed
Simplify Annotation and Text bbox drawing.
Currently Annotation.draw goes through _check_xy to check whether the
annotation should be drawn at all, and then through
_update_position_xytext to position itself. In order to save a single
call to _get_position_xy, it first calls _get_position_xy itself and
then passes it down to the helper functions, making them harder to
follow. Instead, just let _check_xy call _get_position_xy itself (and
even then, this is only needed for some values of annotation_clip), and
likewise for _update_position_xytext (which just becomes a call to
update_positions).
Also a small shortening of Text.update_bbox_position_size.1 parent 9e20541 commit d79dfaa
2 files changed
Lines changed: 12 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
| 1510 | + | |
1513 | 1511 | | |
1514 | | - | |
1515 | | - | |
| 1512 | + | |
1516 | 1513 | | |
1517 | 1514 | | |
1518 | 1515 | | |
1519 | | - | |
1520 | 1516 | | |
1521 | 1517 | | |
1522 | | - | |
1523 | | - | |
1524 | 1518 | | |
1525 | 1519 | | |
1526 | 1520 | | |
1527 | 1521 | | |
1528 | 1522 | | |
1529 | 1523 | | |
1530 | 1524 | | |
1531 | | - | |
1532 | 1525 | | |
1533 | 1526 | | |
1534 | 1527 | | |
| |||
1623 | 1616 | | |
1624 | 1617 | | |
1625 | 1618 | | |
1626 | | - | |
1627 | 1619 | | |
1628 | 1620 | | |
1629 | | - | |
| 1621 | + | |
1630 | 1622 | | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
1634 | | - | |
1635 | | - | |
1636 | 1623 | | |
1637 | | - | |
1638 | 1624 | | |
1639 | 1625 | | |
1640 | 1626 | | |
1641 | 1627 | | |
1642 | | - | |
1643 | 1628 | | |
1644 | 1629 | | |
1645 | 1630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
1484 | | - | |
| 1484 | + | |
1485 | 1485 | | |
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
| 1489 | + | |
1489 | 1490 | | |
1490 | 1491 | | |
1491 | 1492 | | |
| |||
1811 | 1812 | | |
1812 | 1813 | | |
1813 | 1814 | | |
1814 | | - | |
1815 | | - | |
1816 | | - | |
1817 | | - | |
1818 | | - | |
1819 | 1815 | | |
1820 | 1816 | | |
1821 | 1817 | | |
| 1818 | + | |
1822 | 1819 | | |
1823 | 1820 | | |
1824 | 1821 | | |
1825 | 1822 | | |
1826 | 1823 | | |
1827 | 1824 | | |
1828 | | - | |
1829 | 1825 | | |
1830 | 1826 | | |
1831 | 1827 | | |
| |||
1893 | 1889 | | |
1894 | 1890 | | |
1895 | 1891 | | |
1896 | | - | |
1897 | 1892 | | |
1898 | 1893 | | |
1899 | | - | |
1900 | | - | |
1901 | | - | |
1902 | | - | |
1903 | | - | |
| 1894 | + | |
1904 | 1895 | | |
1905 | | - | |
1906 | | - | |
| 1896 | + | |
1907 | 1897 | | |
1908 | | - | |
1909 | 1898 | | |
1910 | 1899 | | |
1911 | 1900 | | |
1912 | 1901 | | |
1913 | | - | |
1914 | 1902 | | |
1915 | 1903 | | |
1916 | 1904 | | |
| |||
0 commit comments