This class provides a simple guard for setting the active masking area for rendering. More...
#include <Luminous/MaskGuard.hpp>
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. | |
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.
| Luminous::MaskGuard::MaskGuard | ( | RenderContext & | rc, |
| const Nimble::Rect & | rect | ||
| ) |
Construct new mask guard.
| rc | render context |
| rect | mask rectangle |
| Luminous::MaskGuard::MaskGuard | ( | MaskGuard && | g | ) |
Move constructor.
| g | guard to move |