[−][src]Enum stdweb::web::CompositeOperation
The type of compositing operation to apply when drawing new shapes
Variants
SourceOver
Draws new shapes over existing canvas content
SourceIn
Draws new shapes over existing canvas content, but only where existing canvas content overlaps. Anything not in that area becomes transparent.
SourceOut
New shapes are drawn where there is no existing canvas content. Everything else (including old canvas content) is made transparent.
SourceAtop
Draws new shapes only where there is existing canvas content, over existing canvas content
DestinationOver
Draws new shapes behind existing canvas content
DestinationIn
Keeps existing canvas content where it overlaps with the new shape. Everything outside the overlap is made transparent.
DestinationOut
The existing content is kept where it doesn't overlap with the new shape. Everything else, including the new shape area, is made transparent.
DestinationAtop
Existing content is kept only where it overlaps with the new shape. The new shape is drawn behind the existing content.
Lighter
Where both shapes overlap, the new color is determined by adding color values
Copy
Only the new shape is shown
Xor
Where both shapes overlap, make it transparent
Multiply
The pixels of the new and old layer are multiplied. (Pixel values are in the range of [0,1], so this makes a darker picture)
Screen
Pixels from both new and old are inverted, multiplied together, then inverted again. (Pixel values are in the range of [0,1], so this makes a lighter picture)
Overlay
Applies Multiply to dark colors in the existing content, and Screen to bright colors in the existing content
Darken
Retains the darkest pixels
Lighten
Retains the lighest pixels
ColorDodge
Divides the bottom layer by the inverted top layer.
ColorBurn
Divides the inverted bottom layer by the top layer, and then inverts the result.
HardLight
A combination of multiply and screen like overlay, but with top and bottom layer swapped.
SoftLight
A softer version of hard-light. Pure black or white does not result in pure black or white.
Difference
Subtracts the bottom layer from the top layer or the other way round to always get a positive value.
Exclusion
Like difference, but with lower contrast.
Hue
Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.
Saturation
Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.
Color
Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.
Luminosity
Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.
Trait Implementations
impl Eq for CompositeOperation
[src]
impl Copy for CompositeOperation
[src]
impl PartialEq<CompositeOperation> for CompositeOperation
[src]
fn eq(&self, other: &CompositeOperation) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for CompositeOperation
[src]
fn clone(&self) -> CompositeOperation
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for CompositeOperation
[src]
Auto Trait Implementations
impl Send for CompositeOperation
impl Sync for CompositeOperation
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,