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

Detailed Description

Uses RAII to create a temporary image that is blended into the parent context when this object goes out of scope.


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

Public Types

using Options = ScopedBlendContextOptions

Public Member Functions

 ScopedBlendContext (Graphics &g, const Options &options)
 Constructor.
GraphicsgetContext ()
 Returns the context for drawing the image that will be blended into the parent context.
bool isClipEmpty () const
 Returns true if the clip region for this context is empty.
 ~ScopedBlendContext ()
 Destructor.

Member Typedef Documentation

◆ Options

Constructors and Destructors

◆ ScopedBlendContext()

juce::ScopedBlendContext::ScopedBlendContext ( Graphics & g,
const Options & options )

Constructor.

The image drawn into the context returned by getContext() will be blended into the context passed in here when this object is destroyed.

See also
ScopedBlendContextOptions

◆ ~ScopedBlendContext()

juce::ScopedBlendContext::~ScopedBlendContext ( )

Destructor.

Member Functions

◆ getContext()

Graphics & juce::ScopedBlendContext::getContext ( )
inline

Returns the context for drawing the image that will be blended into the parent context.

◆ isClipEmpty()

bool juce::ScopedBlendContext::isClipEmpty ( ) const
inline

Returns true if the clip region for this context is empty.

This allows the call site to omit draw calls that wouldn't have a visible effect anyway.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram