@@ -816,6 +816,14 @@ def get_corners(self):
816
816
return self .get_patch_transform ().transform (
817
817
[(0 , 0 ), (1 , 0 ), (1 , 1 ), (0 , 1 )])
818
818
819
+ def _get_edge_midpoints (self ):
820
+ """
821
+ Return the edge midpoints of the rectangle, moving anti-clockwise from
822
+ the center of the left-hand edge.
823
+ """
824
+ return self .get_patch_transform ().transform (
825
+ [(0 , 0.5 ), (0.5 , 0 ), (1 , 0.5 ), (0.5 , 1 )])
826
+
819
827
def get_center (self ):
820
828
"""Return the centre of the rectangle."""
821
829
return self .get_patch_transform ().transform ((0.5 , 0.5 ))
@@ -1681,6 +1689,14 @@ def get_corners(self):
1681
1689
return self .get_patch_transform ().transform (
1682
1690
[(- 1 , - 1 ), (1 , - 1 ), (1 , 1 ), (- 1 , 1 )])
1683
1691
1692
+ def _get_edge_midpoints (self ):
1693
+ """
1694
+ Return the corners of the ellipse, moving anti-clockwise from
1695
+ the center of the left-hand edge before rotation.
1696
+ """
1697
+ return self .get_patch_transform ().transform (
1698
+ [(- 1 , 0 ), (0 , - 1 ), (1 , 0 ), (0 , 1 )])
1699
+
1684
1700
1685
1701
class Annulus (Patch ):
1686
1702
"""
0 commit comments