All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::MaskGuard Class Reference

This class provides a simple guard for setting the active masking area for rendering. More...

#include <Luminous/MaskGuard.hpp>

Inheritance diagram for Luminous::MaskGuard:
Patterns::NotCopyable

Public Member Functions

 MaskGuard (RenderContext &rc, const Nimble::Rect &rect)
 Construct new mask guard. More...
 
 MaskGuard (MaskGuard &&g)
 Move constructor. More...
 
 ~MaskGuard ()
 Destructor. Automatically removes the mask.
 

Detailed Description

This class provides a simple guard for setting the active masking area for rendering.

It will automatically pop in its destructor, so the user does not need to remember to clean up manually. All rendering performed while the guard is alive is clipped to the rectangle given to it.

Constructor & Destructor Documentation

Luminous::MaskGuard::MaskGuard ( RenderContext rc,
const Nimble::Rect rect 
)

Construct new mask guard.

Parameters
rcrender context
rectmask rectangle
Luminous::MaskGuard::MaskGuard ( MaskGuard &&  g)

Move constructor.

Parameters
gguard to move