Documentation
¶
Index ¶
- func DitherPixel(grayLevel int, x, y int) color.Color
- func DrawTestPattern(img *image.Gray, width, height int)
- func DrawTestPatternBW(img *image.Gray, width, height int)
- func LoadFontFace(path string, points float64) (font.Face, error)
- func SavePNG(path string, im image.Image) error
- type Context
- func (dc *Context) Clear()
- func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64)
- func (dc *Context) LoadFontFace(path string, points float64) error
- func (dc *Context) MeasureString(s string) (w, h float64)
- func (dc *Context) SavePNG(path string) error
- func (dc *Context) SetRGB(r float64)
- func (dc *Context) SetRGBA(r float64)
- type FillRule
- type LineCap
- type LineJoin
- type 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
- type Point
- type RepeatOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DitherPixel ¶
DitherPixel converts a gray level to black or white using Bayer dithering
func DrawTestPattern ¶
func DrawTestPatternBW ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContextForGray ¶
func (*Context) DrawStringAnchored ¶
func (*Context) MeasureString ¶
type Matrix ¶
type Matrix struct {
XX, YX, XY, YY, X0, Y0 float64
}
func (Matrix) TransformPoint ¶
func (Matrix) TransformVector ¶
type Pattern ¶
func NewSolidPattern ¶
Click to show internal directories.
Click to hide internal directories.