mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-02 09:17:19 -04:00
2461142fbd
* Minor changes to reduce interdependencies on modules.
47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
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)
|
||
)
|