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

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

Public Types

using Options = ScopedBlendContextOptions
 

Public Member Functions

 ScopedBlendContext (Graphics &g, const Options &options)
 Constructor.
 
Graphics & getContext ()
 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.
 

Detailed Description

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

Member Typedef Documentation

◆ Options

Constructor & Destructor Documentation

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

◆ 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.


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