Skip to main content

BlendMode

Enum BlendMode 

Source
#[non_exhaustive]
pub enum BlendMode {
Show 29 variants Normal, Darken, Multiply, ColorBurn, LinearBurn, Subtract, DarkerColor, Lighten, Screen, ColorDodge, GlowDodge, Add, AddGlow, LighterColor, Overlay, SoftLight, HardLight, Difference, Exclusion, VividLight, LinearLight, PinLight, HardMix, Hue, Saturation, Color, Brightness, Divide, PassThrough,
}
Expand description

Blending modes, numbered as in LayerComposite.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Normal

通常 (0).

§

Darken

比較(暗) (1).

§

Multiply

乗算 (2).

§

ColorBurn

焼き込みカラー (3).

§

LinearBurn

焼き込み(リニア) (4).

§

Subtract

減算 (5).

§

DarkerColor

カラー比較(暗) (6).

§

Lighten

比較(明) (7).

§

Screen

スクリーン (8).

§

ColorDodge

覆い焼きカラー (9).

§

GlowDodge

覆い焼き(発光) (10).

§

Add

加算 (11).

§

AddGlow

加算(発光) (12).

§

LighterColor

カラー比較(明) (13).

§

Overlay

オーバーレイ (14).

§

SoftLight

ソフトライト (15).

§

HardLight

ハードライト (16).

§

Difference

差の絶対値 (21).

§

Exclusion

除外 (22).

§

VividLight

ビビッドライト (17).

§

LinearLight

リニアライト (18).

§

PinLight

ピンライト (19).

§

HardMix

ハードミックス (20).

§

Hue

色相 (23).

§

Saturation

彩度 (24).

§

Color

カラー (25).

§

Brightness

輝度 (26).

§

Divide

除算 (36).

§

PassThrough

Folders only: the children blend with what is below the folder.

Implementations§

Source§

impl BlendMode

Source

pub fn from_code(code: i64) -> Option<Self>

The mode of a LayerComposite value (None for unknown values).

Confirmed with a file made in CSP EX that has one layer per mode (docs/validation/V6-made-files.md). The numbers do not follow the order of CSP’s mode list: darker / lighter colour, difference, exclusion and divide were added later.

Source

pub fn code(self) -> i64

The LayerComposite value of the mode.

Trait Implementations§

Source§

impl Clone for BlendMode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BlendMode

Source§

impl Debug for BlendMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BlendMode

Source§

impl PartialEq for BlendMode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BlendMode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BlendMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.