| 1 | use craterust-analyzer cargo palette 0.7.6 crate/::{ |
| 2 | castrust-analyzer cargo palette 0.7.6 cast/::ArrayCastrust-analyzer cargo palette 0.7.6 cast/array/ArrayCast#, |
| 3 | clamprust-analyzer cargo palette 0.7.6 clamp()., |
| 4 | numrust-analyzer cargo palette 0.7.6 num/::{Arithmeticsrust-analyzer cargo palette 0.7.6 num/Arithmetics#, Clamprust-analyzer cargo palette 0.7.6 num/Clamp#, Onerust-analyzer cargo palette 0.7.6 num/One#, Realrust-analyzer cargo palette 0.7.6 num/Real#, Zerorust-analyzer cargo palette 0.7.6 num/Zero#}, |
| 5 | stimulusrust-analyzer cargo palette 0.7.6 stimulus/::Stimulusrust-analyzer cargo palette 0.7.6 stimulus/Stimulus#, |
| 6 | Alpharust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#, |
| 7 | }; |
| 8 | |
| 9 | use superrust-analyzer cargo palette 0.7.6 blend/::{blend_alpharust-analyzer cargo palette 0.7.6 blend/blend_alpha()., zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors()., PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#, Premultiplyrust-analyzer cargo palette 0.7.6 blend/Premultiply#}; |
| 10 | |
| 11 | /// The Porter Duff composition operators, [as described by |
| 12 | /// W3C](https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators). |
| 13 | /// |
| 14 | /// This set of operators exclude the variants where source and destination are |
| 15 | /// swapped, as well as the "clear", "copy" and "destination" operators. Those |
| 16 | /// can easily be achieved using other means. |
| 17 | pub trait Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose# { |
| 18 | /// Place `self` over `other`. This is the good old common alpha composition |
| 19 | /// equation. |
| 20 | #[must_use] |
| 21 | fn overrust-analyzer cargo palette 0.7.6 blend/compose/Compose#over().(self, other: Self) -> Self; |
| 22 | |
| 23 | /// Results in the parts of `self` that overlaps the visible parts of |
| 24 | /// `other`. |
| 25 | #[must_use] |
| 26 | fn insiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#inside().(self, other: Self) -> Self; |
| 27 | |
| 28 | /// Results in the parts of `self` that lies outside the visible parts of |
| 29 | /// `other`. |
| 30 | #[must_use] |
| 31 | fn outsiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#outside().(self, other: Self) -> Self; |
| 32 | |
| 33 | /// Place `self` over only the visible parts of `other`. |
| 34 | #[must_use] |
| 35 | fn atoprust-analyzer cargo palette 0.7.6 blend/compose/Compose#atop().(self, other: Self) -> Self; |
| 36 | |
| 37 | /// Results in either `self` or `other`, where they do not overlap. |
| 38 | #[must_use] |
| 39 | fn xorrust-analyzer cargo palette 0.7.6 blend/compose/Compose#xor().(self, other: Self) -> Self; |
| 40 | |
| 41 | /// Add `self` and `other`. This uses the alpha component to regulate the |
| 42 | /// effect, so it's not just plain component wise addition. |
| 43 | #[must_use] |
| 44 | fn plusrust-analyzer cargo palette 0.7.6 blend/compose/Compose#plus().(self, other: Self) -> Self; |
| 45 | } |
| 46 | |
| 47 | impl<C, T, const N: usize> Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose# for PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#<C> |
| 48 | where |
| 49 | C: ArrayCastrust-analyzer cargo palette 0.7.6 cast/array/ArrayCast#<Arrayrust-analyzer cargo palette 0.7.6 cast/array/ArrayCast#Array# = [T; N]> + Premultiplyrust-analyzer cargo palette 0.7.6 blend/Premultiply#<Scalarrust-analyzer cargo palette 0.7.6 blend/Premultiply#Scalar# = T>, |
| 50 | T: Realrust-analyzer cargo palette 0.7.6 num/Real# + Zerorust-analyzer cargo palette 0.7.6 num/Zero# + Onerust-analyzer cargo palette 0.7.6 num/One# + Arithmeticsrust-analyzer cargo palette 0.7.6 num/Arithmetics# + Clamprust-analyzer cargo palette 0.7.6 num/Clamp# + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#, |
| 51 | { |
| 52 | #[inline] |
| 53 | fn overrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]over().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 54 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 55 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().&self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().&*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst; |
| 56 | } |
| 57 | |
| 58 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = blend_alpharust-analyzer cargo palette 0.7.6 blend/blend_alpha().(self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha., other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.); |
| 59 | |
| 60 | other |
| 61 | } |
| 62 | |
| 63 | #[inline] |
| 64 | fn insiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]inside().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 65 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 66 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().&other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.; |
| 67 | } |
| 68 | |
| 69 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = clamprust-analyzer cargo palette 0.7.6 clamp().(self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha., T::zerorust-analyzer cargo palette 0.7.6 num/Zero#zero().(), T::onerust-analyzer cargo palette 0.7.6 num/One#one().()); |
| 70 | |
| 71 | other |
| 72 | } |
| 73 | |
| 74 | #[inline] |
| 75 | fn outsiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]outside().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 76 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 77 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().&other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.); |
| 78 | } |
| 79 | |
| 80 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = clamprust-analyzer cargo palette 0.7.6 clamp().(self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.), T::zerorust-analyzer cargo palette 0.7.6 num/Zero#zero().(), T::onerust-analyzer cargo palette 0.7.6 num/One#one().()); |
| 81 | |
| 82 | other |
| 83 | } |
| 84 | |
| 85 | #[inline] |
| 86 | fn atoprust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]atop().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 87 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 88 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().&other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().&self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().&*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst; |
| 89 | } |
| 90 | |
| 91 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = clamprust-analyzer cargo palette 0.7.6 clamp().(other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha., T::zerorust-analyzer cargo palette 0.7.6 num/Zero#zero().(), T::onerust-analyzer cargo palette 0.7.6 num/One#one().()); |
| 92 | |
| 93 | other |
| 94 | } |
| 95 | |
| 96 | #[inline] |
| 97 | fn xorrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]xor().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 98 | let two = || T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().T::onerust-analyzer cargo palette 0.7.6 num/One#one().(); |
| 99 | |
| 100 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 101 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().&other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().(T::onerust-analyzer cargo palette 0.7.6 num/One#one().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().&self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().&*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst; |
| 102 | } |
| 103 | |
| 104 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = clamprust-analyzer cargo palette 0.7.6 clamp().( |
| 105 | self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#clone().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().&other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().two() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha., |
| 106 | T::zerorust-analyzer cargo palette 0.7.6 num/Zero#zero().(), |
| 107 | T::onerust-analyzer cargo palette 0.7.6 num/One#one().(), |
| 108 | ); |
| 109 | |
| 110 | other |
| 111 | } |
| 112 | |
| 113 | #[inline] |
| 114 | fn plusrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]plus().(self, mut other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`PreAlpha<C>`][Compose] { |
| 115 | for (src, dst) in zip_colorsrust-analyzer cargo palette 0.7.6 blend/zip_colors().(self.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color., &mut other.colorrust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#color.) { |
| 116 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst = src rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().&*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().dst; |
| 117 | } |
| 118 | |
| 119 | other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. = clamprust-analyzer cargo palette 0.7.6 clamp().(self.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().other.alpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#alpha., T::zerorust-analyzer cargo palette 0.7.6 num/Zero#zero().(), T::onerust-analyzer cargo palette 0.7.6 num/One#one().()); |
| 120 | |
| 121 | other |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | impl<C> Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose# for Alpharust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#<C, C::Scalarrust-analyzer cargo palette 0.7.6 blend/Premultiply#Scalar#> |
| 126 | where |
| 127 | C: Premultiplyrust-analyzer cargo palette 0.7.6 blend/Premultiply#, |
| 128 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#<C>: Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose#, |
| 129 | { |
| 130 | #[inline] |
| 131 | fn overrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]over().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 132 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().().overrust-analyzer cargo palette 0.7.6 blend/compose/Compose#over().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()).unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 133 | } |
| 134 | |
| 135 | #[inline] |
| 136 | fn insiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]inside().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 137 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().() |
| 138 | .insiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#inside().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()) |
| 139 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 140 | } |
| 141 | |
| 142 | #[inline] |
| 143 | fn outsiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]outside().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 144 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().() |
| 145 | .outsiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#outside().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()) |
| 146 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 147 | } |
| 148 | |
| 149 | #[inline] |
| 150 | fn atoprust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]atop().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 151 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().().atoprust-analyzer cargo palette 0.7.6 blend/compose/Compose#atop().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()).unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 152 | } |
| 153 | |
| 154 | #[inline] |
| 155 | fn xorrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]xor().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 156 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().().xorrust-analyzer cargo palette 0.7.6 blend/compose/Compose#xor().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()).unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 157 | } |
| 158 | |
| 159 | #[inline] |
| 160 | fn plusrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]plus().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[`Alpha<C, <C as Premultiply>::Scalar>`][Compose] { |
| 161 | self.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().().plusrust-analyzer cargo palette 0.7.6 blend/compose/Compose#plus().(other.premultiplyrust-analyzer cargo palette 0.7.6 alpha/alpha/impl#[`Alpha<C, <C as Premultiply>::Scalar>`]premultiply().()).unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | impl<C> Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose# for C |
| 166 | where |
| 167 | C: Premultiplyrust-analyzer cargo palette 0.7.6 blend/Premultiply#, |
| 168 | C::Scalarrust-analyzer cargo palette 0.7.6 blend/Premultiply#Scalar#: Stimulusrust-analyzer cargo palette 0.7.6 stimulus/Stimulus#, |
| 169 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#<C>: Composerust-analyzer cargo palette 0.7.6 blend/compose/Compose#, |
| 170 | { |
| 171 | #[inline] |
| 172 | fn overrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]over().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 173 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 174 | .overrust-analyzer cargo palette 0.7.6 blend/compose/Compose#over().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 175 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 176 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 177 | } |
| 178 | |
| 179 | #[inline] |
| 180 | fn insiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]inside().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 181 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 182 | .insiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#inside().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 183 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 184 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 185 | } |
| 186 | |
| 187 | #[inline] |
| 188 | fn outsiderust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]outside().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 189 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 190 | .outsiderust-analyzer cargo palette 0.7.6 blend/compose/Compose#outside().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 191 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 192 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 193 | } |
| 194 | |
| 195 | #[inline] |
| 196 | fn atoprust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]atop().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 197 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 198 | .atoprust-analyzer cargo palette 0.7.6 blend/compose/Compose#atop().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 199 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 200 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 201 | } |
| 202 | |
| 203 | #[inline] |
| 204 | fn xorrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]xor().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 205 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 206 | .xorrust-analyzer cargo palette 0.7.6 blend/compose/Compose#xor().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 207 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 208 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 209 | } |
| 210 | |
| 211 | #[inline] |
| 212 | fn plusrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]plus().(self, other: Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose]) -> Selfrust-analyzer cargo palette 0.7.6 blend/compose/impl#[C][Compose] { |
| 213 | PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(self) |
| 214 | .plusrust-analyzer cargo palette 0.7.6 blend/compose/Compose#plus().(PreAlpharust-analyzer cargo palette 0.7.6 blend/pre_alpha/PreAlpha#::new_opaquerust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]new_opaque().(other)) |
| 215 | .unpremultiplyrust-analyzer cargo palette 0.7.6 blend/pre_alpha/impl#[`PreAlpha<C>`]unpremultiply().() |
| 216 | .colorrust-analyzer cargo palette 0.7.6 alpha/alpha/Alpha#color. |
| 217 | } |
| 218 | } |