Documentation ¶
Index ¶
- type Canvas
- type Texture
- func (this *Texture) At(x, y int) color.Color
- func (this *Texture) BGRAAt(x, y int) xgraphics.BGRA
- func (this *Texture) Bounds() image.Rectangle
- func (this *Texture) Clip(bounds image.Rectangle) canvas.Texture
- func (this *Texture) Close() error
- func (this *Texture) ColorModel() color.Model
- func (this *Texture) Opaque() bool
- func (this *Texture) PixOffset(x, y int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
Canvas satisfies the canvas.Canvas interface. It draws to an xgraphics.Image. It must be closed after use.
func NewCanvasFrom ¶ added in v0.3.0
NewCanvasFrom creates a new canvas from an existing xgraphics.Image. Note that calling Close() on the resulting canvas will destroy this image.
type Texture ¶ added in v0.3.0
type Texture struct {
// contains filtered or unexported fields
}
Texture is a read-only image texture that can be quickly written to a canvas. It must be closed manually after use.
func AssertTexture ¶ added in v0.3.0
AssertTexture checks if a given canvas.Texture is a texture from this package.
func NewTextureFrom ¶ added in v0.3.0
NewTextureFrom creates a new texture from a source image.
func (*Texture) Clip ¶ added in v0.3.0
Clip returns a subset of this texture that points to the same data.
func (*Texture) ColorModel ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.