Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Size() (int, int) LoadImage(img image.Image) (Image, error) LoadImagePattern(data ImagePatternData) ImagePattern LoadLinearGradient(data Gradient) LinearGradient LoadRadialGradient(data Gradient) RadialGradient Clear(pts [4][2]float64) Fill(style *FillStyle, pts [][2]float64) DrawImage(dimg Image, sx, sy, sw, sh float64, pts [4][2]float64, alpha float64) FillImageMask(style *FillStyle, mask *image.Alpha, pts [][2]float64) // pts must have four points ClearClip() Clip(pts [][2]float64) GetImageData(x, y, w, h int) *image.RGBA PutImageData(img *image.RGBA, x, y int) CanUseAsImage(b Backend) bool AsImage() Image // can return nil if not supported }
Backend is used by the canvas to actually do the final drawing. This enables the backend to be implemented by various methods (OpenGL, but also other APIs or software)
type FillStyle ¶
type FillStyle struct { Color color.RGBA Blur float64 LinearGradient LinearGradient RadialGradient RadialGradient Gradient struct { X0, Y0 float64 X1, Y1 float64 RadFrom float64 RadTo float64 } ImagePattern ImagePattern }
FillStyle is the color and other details on how to fill
type Gradient ¶
type Gradient []GradientStop
type GradientStop ¶
type ImagePattern ¶ added in v0.7.1
type ImagePattern interface { Delete() Replace(data ImagePatternData) }
type ImagePatternData ¶ added in v0.7.1
type ImagePatternData struct {
Image Image
}
type LinearGradient ¶
type LinearGradient interface { Delete() Replace(data Gradient) }
type RadialGradient ¶
type RadialGradient interface { Delete() Replace(data Gradient) }
Click to show internal directories.
Click to hide internal directories.