#[repr(u8)]pub enum CompOp {
Show 29 variants
SrcOver = 0,
SrcCopy = 1,
SrcIn = 2,
SrcOut = 3,
SrcAtop = 4,
DstOver = 5,
DstCopy = 6,
DstIn = 7,
DstOut = 8,
DstAtop = 9,
Xor = 10,
Clear = 11,
Plus = 12,
Minus = 13,
Modulate = 14,
Multiply = 15,
Screen = 16,
Overlay = 17,
Darken = 18,
Lighten = 19,
ColorDodge = 20,
ColorBurn = 21,
LinearBurn = 22,
LinearLight = 23,
PinLight = 24,
HardLight = 25,
SoftLight = 26,
Difference = 27,
Exclusion = 28,
}Expand description
合成オペレーション。Blend2D の BLCompOp と値を合わせている。
Variants§
SrcOver = 0
source を destination の上に Porter-Duff SrcOver で合成する。 out = src + dst * (1 - srcA)
SrcCopy = 1
destination を source で完全に置き換える。 out = src
SrcIn = 2
out = src * dstA
SrcOut = 3
out = src * (1 - dstA)
SrcAtop = 4
out = src * dstA + dst * (1 - srcA)
DstOver = 5
out = dst + src * (1 - dstA)
DstCopy = 6
out = dst (何もしない)
DstIn = 7
out = dst * srcA
DstOut = 8
out = dst * (1 - srcA)
DstAtop = 9
out = dst * srcA + src * (1 - dstA)
Xor = 10
out = src * (1 - dstA) + dst * (1 - srcA)
Clear = 11
out = 0
Plus = 12
out = min(src + dst, 1)
Minus = 13
out = max(dst - src, 0), alpha = SrcOver
Modulate = 14
out_c = src_c * dst_c / 255 (チャネル乗算、alpha も同様)
Multiply = 15
Multiply ブレンド。blend = srcdst, out = blend + src(1-dstA) + dst*(1-srcA)
Screen = 16
Screen ブレンド。out = src + dst - src*dst
Overlay = 17
Overlay ブレンド。条件分岐 (2*Dc < Da)
Darken = 18
Darken ブレンド。blend = min(srcdstA, dstsrcA)
Lighten = 19
Lighten ブレンド。blend = max(srcdstA, dstsrcA)
ColorDodge = 20
ColorDodge ブレンド。除算あり
ColorBurn = 21
ColorBurn ブレンド。除算あり
LinearBurn = 22
LinearBurn ブレンド。飽和減算
LinearLight = 23
LinearLight ブレンド。clamp + 条件
PinLight = 24
PinLight ブレンド。条件分岐 + min/max
HardLight = 25
HardLight ブレンド。条件分岐 (2*Sc < Sa)
SoftLight = 26
SoftLight ブレンド。除算 + sqrt + 条件分岐
Difference = 27
Difference ブレンド。abs 差分
Exclusion = 28
Exclusion ブレンド。単純な算術
Trait Implementations§
impl Copy for CompOp
impl Eq for CompOp
impl StructuralPartialEq for CompOp
Auto Trait Implementations§
impl Freeze for CompOp
impl RefUnwindSafe for CompOp
impl Send for CompOp
impl Sync for CompOp
impl Unpin for CompOp
impl UnsafeUnpin for CompOp
impl UnwindSafe for CompOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.