Table of Contents

Class BlendMode

Namespace
PAC.Colour

A class for blend modes.

public class BlendMode
Inheritance
BlendMode
Inherited Members

Fields

Add

Add blend mode.

public static readonly BlendMode Add

Field Value

BlendMode

Multiply

Multiply blend mode.

public static readonly BlendMode Multiply

Field Value

BlendMode

Normal

Normal blend mode.

public static readonly BlendMode Normal

Field Value

BlendMode

Overlay

Overlay blend mode.

public static readonly BlendMode Overlay

Field Value

BlendMode

Replace

Replace blend mode.

public static readonly BlendMode Replace

Field Value

BlendMode

Screen

Screen blend mode.

public static readonly BlendMode Screen

Field Value

BlendMode

Subtract

Subtract blend mode.

public static readonly BlendMode Subtract

Field Value

BlendMode

blendModes

All implemented blend modes.

public static readonly BlendMode[] blendModes

Field Value

BlendMode[]

Methods

Blend(Color, Color)

Blend the two colours using the blend mode's blend function.

public Color Blend(Color topColour, Color bottomColour)

Parameters

topColour Color
bottomColour Color

Returns

Color

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MultiplyColours(Color, Color)

Multiplies the colours component-wise.

public static Color MultiplyColours(Color colour1, Color colour2)

Parameters

colour1 Color
colour2 Color

Returns

Color

StringToBlendMode(string)

Returns the blend mode with that name (case-insensitive).

public static BlendMode StringToBlendMode(string blendModeName)

Parameters

blendModeName string

Returns

BlendMode

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(BlendMode, BlendMode)

public static bool operator ==(BlendMode a, BlendMode b)

Parameters

a BlendMode
b BlendMode

Returns

bool

operator !=(BlendMode, BlendMode)

public static bool operator !=(BlendMode a, BlendMode b)

Parameters

a BlendMode
b BlendMode

Returns

bool