Enumeration CompositeOperation

The composite operation defines how path fills and strokes are blended with previously rendered paths.

Constructors

  • Parameters

    • do_not_: undefined
    • construct_: undefined
    • this_: undefined
    • type_: undefined

    Returns CompositeOperation

Values

Copy = 9

Displays the source image. The destination image is ignored

DestinationAtop = 7

Displays the destination image on top of the source image. The part of the destination image that is outside the source image is not shown

DestinationIn = 5

Displays the destination image in to the source image. Only the part of the destination image that is INSIDE the source image is shown, and the source image is transparent

DestinationOut = 6

Displays the destination image out of the source image. Only the part of the destination image that is OUTSIDE the source image is shown, and the source image is transparent

DestinationOver = 4

Displays the destination image over the source image

Lighter = 8

Displays the source image + the destination image

SourceAtop = 3

Displays the source image on top of the destination image. The part of the source image that is outside the destination image is not shown

SourceIn = 1

Displays the source image in to the destination image. Only the part of the source image that is INSIDE the destination image is shown, and the destination image is transparent

SourceOut = 2

Displays the source image out of the destination image. Only the part of the source image that is OUTSIDE the destination image is shown, and the destination image is transparent

SourceOver = 0

Displays the source image over the destination image

Xor = 10

The source image is combined by using an exclusive OR with the destination image

Methods

  • Takes an array of enum values and combines them as a single enum flag value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    Returns EnumValueTyped<T, number>

    The combined enum value.

  • Type Parameters

    • T

    Parameters

    Returns string

    Compatibility

  • Returns string[]

    Compatibility

  • Parameters

    • index: number

    Returns number

    Compatibility

  • Returns number[]

    Compatibility

  • Gets the name for the enumeration value that matches the specified enumValue.

    Type Parameters

    • T

    Parameters

    Returns string

    The enumeration value or undefined if not found.

  • Gets the enumeration names

    Returns string[]

    The enumeration names.

  • Gets the enumeration value at the specified index.

    Type Parameters

    • T = number

    Parameters

    • index: number

      The index.

    Returns EnumValueTyped<T, number>

    The enumeration value or undefined if not found.

  • Determines if the enum value has the flags set.

    Type Parameters

    Parameters

    Returns boolean

  • Determines if the enum bits were changed from previousValue to currentValue.

    Type Parameters

    Parameters

    Returns boolean

  • Iterates the enumeration names

    Returns Generator<string, any, any>

    The enumeration names.

  • Iterates the enumeration values

    Type Parameters

    • T = any

    Returns Generator<EnumValueTyped<T, number>, any, any>

    The enumeration values.

  • Takes a single enum value and splits it into separated flag values set on the value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    • value: number | BrandedType<number, "enum"> | BrandedType<T, "enum">

      The enum value to have it's value split using bitwise-and operator.

    Returns EnumValueTyped<T, number>[]

    An array of each "bit flag" set in the enum.