Skip to content

Commit

Permalink
move ComposeTarget to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
faiface committed Apr 11, 2017
1 parent 41e5e8c commit 02e0090
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
28 changes: 28 additions & 0 deletions compose.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package pixel

// 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
ComposeRover
ComposeRin
ComposeRout
ComposeRatop
ComposeXor
ComposePlus
ComposeCopy
)
27 changes: 0 additions & 27 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,6 @@ type BasicTarget interface {
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
ComposeRover
ComposeRin
ComposeRout
ComposeRatop
ComposeXor
ComposePlus
ComposeCopy
)

// 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.)
type Triangles interface {
Expand Down

0 comments on commit 02e0090

Please sign in to comment.