Added a rectangle method to Canvas

This commit is contained in:
Sasha Koshka 2023-07-01 03:02:08 -04:00
parent bb07363c89
commit 48fe7ef5e1
1 changed files with 5 additions and 2 deletions

View File

@ -32,8 +32,11 @@ type StrokeAlign int; const (
// have multiple pens associated with it, each maintaining their own drawing
// context.
type Pen interface {
// Draw draws a path
Draw (points ...image.Point)
// Rectangle draws a rectangle
Rectangle (image.Rectangle)
// Path draws a path
Path (points ...image.Point)
Closed (bool) // if the path is closed
Cap (Cap) // line cap stype