Versions in this module Expand all Collapse all v1 v1.1.0 Mar 16, 2018 Changes in this version type Context + func (dc *Context) AsMask() *image.Alpha + func (dc *Context) FontHeight() float64 + func (dc *Context) SetMask(mask *image.Alpha) error v1.0.0 Dec 21, 2016 Changes in this version + func Degrees(radians float64) float64 + func LoadFontFace(path string, points float64) (font.Face, error) + func LoadImage(path string) (image.Image, error) + func LoadPNG(path string) (image.Image, error) + func Radians(degrees float64) float64 + func SavePNG(path string, im image.Image) error + type Align int + const AlignCenter + const AlignLeft + const AlignRight + type Context struct + func NewContext(width, height int) *Context + func NewContextForImage(im image.Image) *Context + func NewContextForRGBA(im *image.RGBA) *Context + func (dc *Context) Clear() + func (dc *Context) ClearPath() + func (dc *Context) Clip() + func (dc *Context) ClipPreserve() + func (dc *Context) ClosePath() + func (dc *Context) CubicTo(x1, y1, x2, y2, x3, y3 float64) + func (dc *Context) DrawArc(x, y, r, angle1, angle2 float64) + func (dc *Context) DrawCircle(x, y, r float64) + func (dc *Context) DrawEllipse(x, y, rx, ry float64) + func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) + func (dc *Context) DrawImage(im image.Image, x, y int) + func (dc *Context) DrawImageAnchored(im image.Image, x, y int, ax, ay float64) + func (dc *Context) DrawLine(x1, y1, x2, y2 float64) + func (dc *Context) DrawPoint(x, y, r float64) + func (dc *Context) DrawRectangle(x, y, w, h float64) + func (dc *Context) DrawRegularPolygon(n int, x, y, r, rotation float64) + func (dc *Context) DrawRoundedRectangle(x, y, w, h, r float64) + func (dc *Context) DrawString(s string, x, y float64) + func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) + func (dc *Context) DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align Align) + func (dc *Context) EncodePNG(w io.Writer) error + func (dc *Context) Fill() + func (dc *Context) FillPreserve() + func (dc *Context) Height() int + func (dc *Context) Identity() + func (dc *Context) Image() image.Image + func (dc *Context) InvertY() + func (dc *Context) LineTo(x, y float64) + func (dc *Context) LoadFontFace(path string, points float64) error + func (dc *Context) MeasureString(s string) (w, h float64) + func (dc *Context) MoveTo(x, y float64) + func (dc *Context) NewSubPath() + func (dc *Context) Pop() + func (dc *Context) Push() + func (dc *Context) QuadraticTo(x1, y1, x2, y2 float64) + func (dc *Context) ResetClip() + func (dc *Context) Rotate(angle float64) + func (dc *Context) RotateAbout(angle, x, y float64) + func (dc *Context) SavePNG(path string) error + func (dc *Context) Scale(x, y float64) + func (dc *Context) ScaleAbout(sx, sy, x, y float64) + func (dc *Context) SetColor(c color.Color) + func (dc *Context) SetDash(dashes ...float64) + func (dc *Context) SetFillRule(fillRule FillRule) + func (dc *Context) SetFillRuleEvenOdd() + func (dc *Context) SetFillRuleWinding() + func (dc *Context) SetFillStyle(pattern Pattern) + func (dc *Context) SetFontFace(fontFace font.Face) + func (dc *Context) SetHexColor(x string) + func (dc *Context) SetLineCap(lineCap LineCap) + func (dc *Context) SetLineCapButt() + func (dc *Context) SetLineCapRound() + func (dc *Context) SetLineCapSquare() + func (dc *Context) SetLineJoin(lineJoin LineJoin) + func (dc *Context) SetLineJoinBevel() + func (dc *Context) SetLineJoinRound() + func (dc *Context) SetLineWidth(lineWidth float64) + func (dc *Context) SetPixel(x, y int) + func (dc *Context) SetRGB(r, g, b float64) + func (dc *Context) SetRGB255(r, g, b int) + func (dc *Context) SetRGBA(r, g, b, a float64) + func (dc *Context) SetRGBA255(r, g, b, a int) + func (dc *Context) SetStrokeStyle(pattern Pattern) + func (dc *Context) Shear(x, y float64) + func (dc *Context) ShearAbout(sx, sy, x, y float64) + func (dc *Context) Stroke() + func (dc *Context) StrokePreserve() + func (dc *Context) TransformPoint(x, y float64) (tx, ty float64) + func (dc *Context) Translate(x, y float64) + func (dc *Context) Width() int + func (dc *Context) WordWrap(s string, w float64) []string + type FillRule int + const FillRuleEvenOdd + const FillRuleWinding + type Gradient interface + AddColorStop func(offset float64, color color.Color) + func NewLinearGradient(x0, y0, x1, y1 float64) Gradient + func NewRadialGradient(x0, y0, r0, x1, y1, r1 float64) Gradient + type LineCap int + const LineCapButt + const LineCapRound + const LineCapSquare + type LineJoin int + const LineJoinBevel + const LineJoinRound + type Matrix struct + X0 float64 + XX float64 + XY float64 + Y0 float64 + YX float64 + YY float64 + func Identity() Matrix + func Rotate(angle float64) Matrix + func Scale(x, y float64) Matrix + func Shear(x, y float64) Matrix + func Translate(x, y float64) Matrix + func (a Matrix) Multiply(b Matrix) Matrix + func (a Matrix) Rotate(angle float64) Matrix + func (a Matrix) Scale(x, y float64) Matrix + func (a Matrix) Shear(x, y float64) Matrix + func (a Matrix) TransformPoint(x, y float64) (tx, ty float64) + func (a Matrix) TransformVector(x, y float64) (tx, ty float64) + func (a Matrix) Translate(x, y float64) Matrix + type Pattern interface + ColorAt func(x, y int) color.Color + func NewSolidPattern(color color.Color) Pattern + func NewSurfacePattern(im image.Image, op RepeatOp) Pattern + type Point struct + X float64 + Y float64 + func CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3 float64) []Point + func QuadraticBezier(x0, y0, x1, y1, x2, y2 float64) []Point + func (a Point) Distance(b Point) float64 + func (a Point) Fixed() fixed.Point26_6 + func (a Point) Interpolate(b Point, t float64) Point + type RepeatOp int + const RepeatBoth + const RepeatNone + const RepeatX + const RepeatY