#[repr(u32)]
pub enum CompositeOperator {
Show 49 variants UndefinedCompositeOp, OverCompositeOp, InCompositeOp, OutCompositeOp, AtopCompositeOp, XorCompositeOp, PlusCompositeOp, MinusCompositeOp, AddCompositeOp, SubtractCompositeOp, DifferenceCompositeOp, MultiplyCompositeOp, BumpmapCompositeOp, CopyCompositeOp, CopyRedCompositeOp, CopyGreenCompositeOp, CopyBlueCompositeOp, CopyOpacityCompositeOp, ClearCompositeOp, DissolveCompositeOp, DisplaceCompositeOp, ModulateCompositeOp, ThresholdCompositeOp, NoCompositeOp, DarkenCompositeOp, LightenCompositeOp, HueCompositeOp, SaturateCompositeOp, ColorizeCompositeOp, LuminizeCompositeOp, ScreenCompositeOp, OverlayCompositeOp, CopyCyanCompositeOp, CopyMagentaCompositeOp, CopyYellowCompositeOp, CopyBlackCompositeOp, DivideCompositeOp, HardLightCompositeOp, ExclusionCompositeOp, ColorDodgeCompositeOp, ColorBurnCompositeOp, SoftLightCompositeOp, LinearBurnCompositeOp, LinearDodgeCompositeOp, LinearLightCompositeOp, VividLightCompositeOp, PinLightCompositeOp, HardMixCompositeOp, Unknown,
}
Expand description

CompositeOperator is used to select the image composition algorithm used to compose a composite image with an image. By default, each of the composite image pixels are replaced by the corresponding image tile pixel. Specify CompositeOperator to select a different algorithm.

The image compositor requires a matte, or alpha channel in the image for some operations. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. For certain operations, if image does not have a matte channel, it is initialized with 0 for any pixel matching in color to pixel location (0,0), otherwise 255 (to work properly borderWidth must be 0).

http://www.graphicsmagick.org/api/types.html#compositeoperator

Variants§

§

UndefinedCompositeOp

Unset value.

§

OverCompositeOp

The result is the union of the the two image shapes with the composite image obscuring image in the region of overlap.

§

InCompositeOp

The result is a simply composite image cut by the shape of image. None of the image data of image is included in the result.

§

OutCompositeOp

The resulting image is composite image with the shape of image cut out.

§

AtopCompositeOp

The result is the same shape as image image, with composite image obscuring image there the image shapes overlap. Note that this differs from OverCompositeOp because the portion of composite image outside of image’s shape does not appear in the result.

§

XorCompositeOp

The result is the image data from both composite image and image that is outside the overlap region. The overlap region will be blank.

§

PlusCompositeOp

The result is just the sum of the image data. Output values are cropped to 255 (no over=low). This operation is independent of the matte channels.

§

MinusCompositeOp

The result of composite image - image, with overflow cropped to zero. The matte chanel is ignored (set to 255, full coverage).

§

AddCompositeOp

The result of composite image + image, with overflow wrapping around (mod 256).

§

SubtractCompositeOp

The result of composite image - image, with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reversible transformations.

§

DifferenceCompositeOp

The result of abs(composite image - image). This is useful for comparing two very similar images.

§

MultiplyCompositeOp

§

BumpmapCompositeOp

The result image shaded by composite image.

§

CopyCompositeOp

The resulting image is image replaced with composite image. Here the matte information is ignored.

§

CopyRedCompositeOp

The resulting image is the red layer in image replaced with the red layer in composite image. The other layers are copied untouched.

§

CopyGreenCompositeOp

The resulting image is the green layer in image replaced with the green layer in composite image. The other layers are copied untouched.

§

CopyBlueCompositeOp

The resulting image is the blue layer in image replaced with the blue layer in composite image. The other layers are copied untouched.

§

CopyOpacityCompositeOp

The resulting image is the matte layer in image replaced with the matte layer in composite image. The other layers are copied untouched.

§

ClearCompositeOp

Pixels in the region are set to Transparent.

§

DissolveCompositeOp

§

DisplaceCompositeOp

§

ModulateCompositeOp

Modulate brightness in HSL space.

§

ThresholdCompositeOp

§

NoCompositeOp

Do nothing at all.

§

DarkenCompositeOp

§

LightenCompositeOp

§

HueCompositeOp

Copy Hue channel (from HSL colorspace).

§

SaturateCompositeOp

Copy Saturation channel (from HSL colorspace).

§

ColorizeCompositeOp

Copy Hue and Saturation channels (from HSL colorspace).

§

LuminizeCompositeOp

Copy Brightness channel (from HSL colorspace).

§

ScreenCompositeOp

[Not yet implemented]

§

OverlayCompositeOp

[Not yet implemented]

§

CopyCyanCompositeOp

Copy the Cyan channel.

§

CopyMagentaCompositeOp

Copy the Magenta channel.

§

CopyYellowCompositeOp

Copy the Yellow channel.

§

CopyBlackCompositeOp

Copy the Black channel.

§

DivideCompositeOp

§

HardLightCompositeOp

§

ExclusionCompositeOp

§

ColorDodgeCompositeOp

§

ColorBurnCompositeOp

§

SoftLightCompositeOp

§

LinearBurnCompositeOp

§

LinearDodgeCompositeOp

§

LinearLightCompositeOp

§

VividLightCompositeOp

§

PinLightCompositeOp

§

HardMixCompositeOp

§

Unknown

Trait Implementations§

source§

impl Clone for CompositeOperator

source§

fn clone(&self) -> CompositeOperator

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for CompositeOperator

source§

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

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

impl From<CompositeOperator> for u32

source§

fn from(enum_value: CompositeOperator) -> Self

Converts to this type from the input type.
source§

impl From<u32> for CompositeOperator

source§

fn from(number: u32) -> Self

Converts to this type from the input type.
source§

impl FromPrimitive for CompositeOperator

§

type Primitive = u32

source§

fn from_primitive(number: Self::Primitive) -> Self

source§

impl PartialEq<CompositeOperator> for CompositeOperator

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFromPrimitive for CompositeOperator

§

type Primitive = u32

source§

const NAME: &'static str = _

source§

fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>

source§

impl Copy for CompositeOperator

source§

impl Eq for CompositeOperator

source§

impl StructuralEq for CompositeOperator

source§

impl StructuralPartialEq for CompositeOperator

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.