Documentation ¶
Index ¶
- func DrawShapes(img draw.Image, x, y int, shapes ...Shaper) error
- func FilledImage(width, height int, fill color.Color) draw.Image
- func SaveImage(img image.Image, filename string) error
- type Circle
- type CircularShaper
- type Option
- 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 RectangularShaper
- 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 RegularPolygonalShaper
- type Shaper
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 CircularShaper ¶
type Rectangle ¶
The zero value is invalid! Use NewRectangle() to create a valid Rectangle.
type RectangularShaper ¶
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
type RegularPolygonalShaper ¶
type RegularPolygonalShaper interface { CircularShaper // Fill(); SetFill(); Draw(); Radius(); SetRadius() Sides() int SetSides(sides int) }
Click to show internal directories.
Click to hide internal directories.