Documentation ¶
Index ¶
- func DrawShapes(img draw.Image, x, y int, shapes ...Drawer) error
- func FilledImage(width, height int, fill color.Color) draw.Image
- func SaveImage(img image.Image, filename string) error
- type Circle
- type Drawer
- type Filleder
- type Filler
- type Option
- type Radiuser
- type Rectangle
- func (rectangle *Rectangle) Draw(img draw.Image, x, y int) error
- func (shape Rectangle) Fill() color.Color
- func (rectangle *Rectangle) Filled() bool
- func (rectangle *Rectangle) Rect() image.Rectangle
- func (shape *Rectangle) SetFill(fill color.Color)
- func (rectangle *Rectangle) SetFilled(filled bool)
- func (rectangle *Rectangle) SetRect(rect image.Rectangle)
- type Rectangler
- type RegularPolygon
- func (polygon *RegularPolygon) Draw(img draw.Image, x, y int) error
- func (shape RegularPolygon) Fill() color.Color
- func (shape RegularPolygon) SetFill(fill color.Color)
- func (polygon *RegularPolygon) SetSides(sides int)
- func (polygon *RegularPolygon) Sides() int
- func (polygon *RegularPolygon) String() string
- type Shaper
- type Sideser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Circle ¶
type Circle struct {
// contains filtered or unexported fields
}
The zero value is invalid! Use NewCircle() to create a valid Circle.
type Rectangle ¶
The zero value is invalid! Use NewRectangle() to create a valid Rectangle.
type RegularPolygon ¶
type RegularPolygon struct { *Circle // contains filtered or unexported fields }
The zero value is invalid! Use NewRegularPolygon() to create a valid RegularPolygon.
func NewRegularPolygon ¶
func NewRegularPolygon(fill color.Color, radius, sides int) *RegularPolygon
func (*RegularPolygon) SetSides ¶
func (polygon *RegularPolygon) SetSides(sides int)
func (*RegularPolygon) Sides ¶
func (polygon *RegularPolygon) Sides() int
func (*RegularPolygon) String ¶
func (polygon *RegularPolygon) String() string
Click to show internal directories.
Click to hide internal directories.