Documentation ¶
Index ¶
- type Context
- func (c *Context) Cross(x, y, size int)
- func (c *Context) Dot(x, y int)
- func (c *Context) Dots(points []image.Point)
- func (c *Context) FillPixel(x, y int)
- func (c *Context) IsInPolygon(x, y int, points []image.Point) bool
- func (c *Context) Line(x0, y0, x1, y1 int)
- func (c *Context) Parabola(a1, b1, c1 float64)
- func (c *Context) ParabolaArc(a1, b1, c1 float64, x1, x2 int)
- func (c *Context) Path(points []image.Point)
- func (c *Context) Polygon(points []image.Point)
- func (c *Context) Rect(x0, y0, x1, y1 int)
- func (c *Context) SetFill(clr color.Color)
- func (c *Context) SetFontFace(font *truetype.Font, options *truetype.Options)
- func (c *Context) SetFontSize(size float64)
- func (c *Context) SetPen(clr color.Color)
- func (c *Context) SetTextColor(clr color.Color)
- func (c *Context) Text(x, y int, text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context provides simple methods for drawing over an image.
func NewContext ¶
NewContext creates a new context for drawing over image.
func (*Context) IsInPolygon ¶
IsInPolygon tests if the point at X and Y lies inside the polygon defined by the given points.
func (*Context) Line ¶
Line draws an approximation of a straight line between two points using Bresenham's algorithm.
func (*Context) ParabolaArc ¶
ParabolaArc draws the arc of parabola between x1 and x2 with the specified coefficients a, b and c.
func (*Context) SetFontFace ¶
SetFontFace changes the font face and font options.
func (*Context) SetFontSize ¶
SetFontSize changes the font size only.
func (*Context) SetTextColor ¶
SetTextColor changes the text color.
Click to show internal directories.
Click to hide internal directories.