Skip to content

Commit

Permalink
Use shape.get_verts() to get vertices
Browse files Browse the repository at this point in the history
This makes the ellipses in the polar view appear much smoother.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Sep 20, 2023
1 parent af3796a commit c8cd796
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hexrd/ui/mask_regions_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ def update_interactive_template(self, event):
if self.selection == 'Ellipse':
center = [(width / 2 + x0), (height / 2 + y0)]
shape = patches.Ellipse(center, width, height)
verts = shape.get_patch_transform().transform(
shape.get_path().vertices[:-1])
verts = shape.get_verts()
verts = add_sample_points(verts, 300)
self.interactive_template.template.set_xy(verts)
self.interactive_template.center = (
Expand Down

0 comments on commit c8cd796

Please sign in to comment.