1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 09:17:19 -04:00
OpenDiablo2/d2common/composite_mode.go
Tim Sarbin 2461142fbd
Minor changes to project layout (#276)
* Minor changes to reduce interdependencies on modules.
2020-01-31 23:18:11 -05:00

47 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package d2common
type CompositeMode int
const (
// Regular alpha blending
// c_out = c_src + c_dst × (1 - α_src)
CompositeModeSourceOver CompositeMode = CompositeMode(1)
// c_out = 0
CompositeModeClear CompositeMode = CompositeMode(2)
// c_out = c_src
CompositeModeCopy CompositeMode = CompositeMode(3)
// c_out = c_dst
CompositeModeDestination CompositeMode = CompositeMode(4)
// c_out = c_src × (1 - α_dst) + c_dst
CompositeModeDestinationOver CompositeMode = CompositeMode(5)
// c_out = c_src × α_dst
CompositeModeSourceIn CompositeMode = CompositeMode(6)
// c_out = c_dst × α_src
CompositeModeDestinationIn CompositeMode = CompositeMode(7)
// c_out = c_src × (1 - α_dst)
CompositeModeSourceOut CompositeMode = CompositeMode(8)
// c_out = c_dst × (1 - α_src)
CompositeModeDestinationOut CompositeMode = CompositeMode(9)
// c_out = c_src × α_dst + c_dst × (1 - α_src)
CompositeModeSourceAtop CompositeMode = CompositeMode(10)
// c_out = c_src × (1 - α_dst) + c_dst × α_src
CompositeModeDestinationAtop CompositeMode = CompositeMode(11)
// c_out = c_src × (1 - α_dst) + c_dst × (1 - α_src)
CompositeModeXor CompositeMode = CompositeMode(12)
// Sum of source and destination (a.k.a. 'plus' or 'additive')
// c_out = c_src + c_dst
CompositeModeLighter CompositeMode = CompositeMode(13)
)