Skip to content

Commit

Permalink
draw2d: add initial rounded rect support (still have edge cases)
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Dec 14, 2023
1 parent 641bed9 commit 02953a8
Show file tree
Hide file tree
Showing 5 changed files with 512 additions and 64 deletions.
3 changes: 3 additions & 0 deletions easy/easy.api.v
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ pub struct EasyRectConfig {
pub mut:
stroke shy.Stroke
rotation f32
radius f32 // for rounded corners
scale f32 = 1.0
color shy.Color = shy.colors.shy.red
fills shy.Fill = .body | .stroke
Expand All @@ -174,6 +175,7 @@ pub struct EasyRect {
pub mut:
stroke shy.Stroke
rotation f32
radius f32 // for rounded corners
scale f32 = 1.0
color shy.Color = shy.colors.shy.red
fills shy.Fill = .body | .stroke
Expand All @@ -193,6 +195,7 @@ pub fn (er &EasyRect) draw() {
r.height = er.height
r.stroke = er.stroke
r.rotation = er.rotation
r.radius = er.radius
r.scale = er.scale
r.color = er.color
r.fills = er.fills
Expand Down
Loading

0 comments on commit 02953a8

Please sign in to comment.