Loading...
Searching...
No Matches
juce::ScopedBlendContextOptions Class Reference

The documentation for this class was generated from the following file:

Public Member Functions

 ScopedBlendContextOptions ()=default
 ScopedBlendContextOptions (BlendMode mode)
 Creates an object using the provided blend mode.
ScopedBlendContextOptions withBlendMode (BlendMode x) const
 Specifies the blend mode to be applied when blending the backing buffer into the parent buffer.
ScopedBlendContextOptions withLuminanceMaskSet (bool x=true) const
 When this option is set, the backing buffer's luminosity is converted to alpha values prior to blending it into the parent buffer.
ScopedBlendContextOptions withScopeClip (Rectangle< int > x) const
 Allows specifying an additional clip for the blend context, reducing the necessary size of the backing buffer.
ScopedBlendContextOptions withOpacity (float x) const
 Allows specifying an additional opacity value that is applied prior to blending the buffer into the parent.
const auto & getBlendMode () const
const auto & isLuminanceMask () const
const auto & getScopeClip () const
const auto & getOpacity () const

Constructors and Destructors

◆ ScopedBlendContextOptions() [1/2]

juce::ScopedBlendContextOptions::ScopedBlendContextOptions ( )
default

◆ ScopedBlendContextOptions() [2/2]

juce::ScopedBlendContextOptions::ScopedBlendContextOptions ( BlendMode mode)
inlineexplicit

Creates an object using the provided blend mode.

Member Functions

◆ withBlendMode()

ScopedBlendContextOptions juce::ScopedBlendContextOptions::withBlendMode ( BlendMode x) const
inlinenodiscard

Specifies the blend mode to be applied when blending the backing buffer into the parent buffer.

See also
BlendMode

References ScopedBlendContextOptions(), juce::withMember(), and x.

◆ withLuminanceMaskSet()

ScopedBlendContextOptions juce::ScopedBlendContextOptions::withLuminanceMaskSet ( bool x = true) const
inlinenodiscard

When this option is set, the backing buffer's luminosity is converted to alpha values prior to blending it into the parent buffer.

After conversion, the RGB components are zero, and the A component is calculated using the equation in the SVG specification A = ((0.2125 * R) + (0.7154 * G) + (0.0721 * B)) * A.

References ScopedBlendContextOptions(), juce::withMember(), and x.

◆ withScopeClip()

ScopedBlendContextOptions juce::ScopedBlendContextOptions::withScopeClip ( Rectangle< int > x) const
inlinenodiscard

Allows specifying an additional clip for the blend context, reducing the necessary size of the backing buffer.

By default the backing buffer will be the same size as the parent context's clip region. Even if this value is provided, it is ignored for certain blending modes such as destinationIn and destinationOut.

References ScopedBlendContextOptions(), juce::withMember(), and x.

◆ withOpacity()

ScopedBlendContextOptions juce::ScopedBlendContextOptions::withOpacity ( float x) const
inlinenodiscard

Allows specifying an additional opacity value that is applied prior to blending the buffer into the parent.

References ScopedBlendContextOptions(), juce::withMember(), and x.

◆ getBlendMode()

const auto & juce::ScopedBlendContextOptions::getBlendMode ( ) const
inline
See also
withBlendMode()

◆ isLuminanceMask()

const auto & juce::ScopedBlendContextOptions::isLuminanceMask ( ) const
inline

◆ getScopeClip()

const auto & juce::ScopedBlendContextOptions::getScopeClip ( ) const
inline
See also
withScopeClip()

◆ getOpacity()

const auto & juce::ScopedBlendContextOptions::getOpacity ( ) const
inline
See also
withOpacity()
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram