add ComposeTarget interface
This commit is contained in:
parent
bb7b98eda8
commit
8da51853be
24
interface.go
24
interface.go
|
@ -38,6 +38,30 @@ type BasicTarget interface {
|
||||||
SetColorMask(color.Color)
|
SetColorMask(color.Color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ComposeTarget is a BasicTarget capable of Porter-Duff composition.
|
||||||
|
type ComposeTarget interface {
|
||||||
|
BasicTarget
|
||||||
|
|
||||||
|
// SetComposeMethod sets a Porter-Duff composition method to be used.
|
||||||
|
SetComposeMethod(ComposeMethod)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ComposeMethod is a Porter-Duff composition method.
|
||||||
|
type ComposeMethod int
|
||||||
|
|
||||||
|
// Here's the list of all available Porter-Duff composition methods. User ComposeOver for the basic
|
||||||
|
// alpha blending.
|
||||||
|
const (
|
||||||
|
ComposeOver ComposeMethod = iota
|
||||||
|
ComposeIn
|
||||||
|
ComposeOut
|
||||||
|
ComposeAtop
|
||||||
|
ComposeDstIn
|
||||||
|
ComposeDstOut
|
||||||
|
ComposeDstAtop
|
||||||
|
ComposeXor
|
||||||
|
)
|
||||||
|
|
||||||
// Triangles represents a list of vertices, where each three vertices form a triangle. (First,
|
// Triangles represents a list of vertices, where each three vertices form a triangle. (First,
|
||||||
// second and third is the first triangle, fourth, fifth and sixth is the second triangle, etc.)
|
// second and third is the first triangle, fourth, fifth and sixth is the second triangle, etc.)
|
||||||
type Triangles interface {
|
type Triangles interface {
|
||||||
|
|
Loading…
Reference in New Issue