JUCE API reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::ScopedBlendContextOptions Class Reference

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
 

Constructor & Destructor Documentation

◆ 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 Function Documentation

◆ withBlendMode()

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

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

See also
BlendMode

References juce::withMember(), and x.

◆ withLuminanceMaskSet()

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

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 juce::withMember(), and x.

◆ withScopeClip()

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

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 juce::withMember(), and x.

◆ withOpacity()

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

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

References 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()

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