Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Last active February 1, 2021 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akexorcist/cd700a625254ec9d177dfc729badaaf8 to your computer and use it in GitHub Desktop.
Save akexorcist/cd700a625254ec9d177dfc729badaaf8 to your computer and use it in GitHub Desktop.
### Start point
x = area_width - (corner_radius + (border_width / 2))
y = border_width / 2
### Top right corner
x1 = area_width - ((corner_radius * 2) + (border_width / 2))
y1 = border_width / 2
x2 = area_width - (border_width / 2)
y2 = (corner_radius * 2) + (border_width / 2)
start_angle = 270
sweep_angle = 90
### Right edge semi circle
x1 = area_width - ((semi_circle_radius / 2) + (border_width / 2))
y1 = (area_height / 2) - (semi_circle_radius / 2)
x2 = area_width + ((semi_circle_radius / 2) - (border_width / 2))
y2 = (area_height / 2) + (semi_circle_radius / 2)
start_angle = 270
sweep_angle = -180
### Bottom right corner
x1 = area_width - ((corner_radius * 2) + (border_width / 2))
y1 = area_height - ((corner_radius * 2) + (border_width / 2))
x2 = area_width - (border_width / 2)
y2 = area_height - (botder_width / 2)
start_angle = 0
sweep_angle = 90
### Bottom edge semi circle
x1 = (area_width / 2) - (semi_circle_radius / 2)
y1 = area_height - ((semi_circle_radius / 2) + (border_width / 2))
x2 = (area_width / 2) + (semi_circle_radius / 2)
y2 = area_height + ((semi_circle_radius / 2) - (border_width / 2))
start_angle = 0
sweep_angle = -180
### Bottom left corner
x1 = border_width / 2
y1 = area_height - ((corner_radius * 2) + (border_width / 2))
x2 = (corner_radius * 2) + (border_width / 2)
y2 = area_height - (botder_width / 2)
start_angle = 90
sweep_angle = 90
### Left edge semi circle
x1 = -(semi_circle_radius / 2) + (border_width / 2)
y1 = (area_height / 2) - (semi_circle_radius / 2)
x2 = (semi_circle_radius / 2) + (border_width / 2)
y2 = (area_height / 2) + (semi_circle_radius / 2)
start_angle = 90
sweep_angle = -180
### Top left corner
x1 = border_width / 2
y1 = border_width / 2
x2 = (corner_radius * 2) + (border_width / 2)
y2 = (corner_radius * 2) + (border_width / 2)
start_angle = 180
sweep_angle = 90
### Top edge semi circle
x1 = (area_width / 2) - (semi_circle_radius / 2)
y1 = -(semi_circle_radius / 2) + (border_width / 2)
x2 = (area_width / 2) + (semi_circle_radius / 2)
y2 = (semi_circle_radius / 2) + (border_width / 2)
start_angle = 180
sweep_angle = -180
@YobHumnoy
Copy link

Top left corner

start_angle = 180 <--------------- top-left corner
sweep_angle = 90

@akexorcist
Copy link
Author

Top left corner

start_angle = 180 <--------------- top-left corner
sweep_angle = 90

@YobHumnoy Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment