Documentation ¶
Index ¶
- func MakeColor(r, g, b uint8) color.Color
- type Canvas
- func (c *Canvas) ArcTo(x, y, radiusX, radiusY, degStart, degEnd float64)
- func (c *Canvas) Circle(cx, cy, r float64)
- func (c *Canvas) Clear()
- func (c *Canvas) ClearRect(x1, y1, x2, y2 int)
- func (c *Canvas) Ellipse(cx, cy, rx, ry float64)
- func (c *Canvas) Fill()
- func (c *Canvas) FillStroke()
- func (c *Canvas) GetImage() image.Image
- func (c *Canvas) Height() int
- func (c *Canvas) LineTo(x, y float64)
- func (c *Canvas) MoveTo(x, y float64)
- func (c *Canvas) SaveToPNG(filename string)
- func (c *Canvas) SaveToPNG2(filename string)
- func (c *Canvas) SetFillColor(col color.Color)
- func (c *Canvas) SetLineWidth(w float64)
- func (c *Canvas) SetStrokeColor(col color.Color)
- func (c *Canvas) Stroke()
- func (c *Canvas) Width() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func (*Canvas) ArcTo ¶
Draw an arc from the current point to (x, y) Can be used to easily draw a circle or an ellipse
func (*Canvas) Circle ¶
Draws an empty circle Fill the given circle with the fill color Stroke() each time to avoid connected circles
func (*Canvas) Ellipse ¶
Draws an empty ellipse Fill the given ellipse with the fill color Stroke() each time to avoid connected ellipses
func (*Canvas) Fill ¶
func (c *Canvas) Fill()
Fill the area inside the lines you've set up with LineTo, but don't draw the lines
func (*Canvas) FillStroke ¶
func (c *Canvas) FillStroke()
Fill the area inside the lines you've set up with LineTo
func (*Canvas) LineTo ¶
Draw a line from the current point to (x,y), and set the current point to (x,y)
func (*Canvas) SaveToPNG2 ¶
Click to show internal directories.
Click to hide internal directories.