Skip to content

Commit

Permalink
shorten animatedclipping.go
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Naur <mail@eliasnaur.com>
  • Loading branch information
eliasnaur committed Nov 18, 2019
1 parent ce9adb7 commit badca61
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions animatedclipping.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ func main() {
// Color
paint.ColorOp{Color: color.RGBA{A: 0xff, G: 0xcc}}.Add(ops) // HLdraw
// Clip corners
clip.Rect{ // HLdraw
Rect: f32.Rectangle{ // HLdraw
Max: f32.Point{X: 500, Y: 500}, // HLdraw
}, // HLdraw
NE: radius, NW: radius, SE: radius, SW: radius, // HLdraw
}.Op(ops).Add(ops) // HLdraw
clip.Rect{Rect: f32.Rectangle{ // HLdraw
Max: f32.Point{X: 500, Y: 500}, // HLdraw
}, NE: radius, NW: radius, SE: radius, SW: radius}.Op(ops).Add(ops) // HLdraw
// Draw
paint.PaintOp{Rect: square}.Add(ops) // HLdraw
// Animate
Expand Down

0 comments on commit badca61

Please sign in to comment.