|
Rose
|
Store the current clip rectangle replacing it with a new clip rectangle. More...
#include <Renderer.h>

Public Member Functions | |
| ClipRectangleGuard ()=delete | |
| Deleted default constructor. | |
| ClipRectangleGuard (const ClipRectangleGuard &)=delete | |
| Deleted copy constructor. | |
| ~ClipRectangleGuard () | |
| Set the old clip rectangle back on the renderer when destroyed. | |
| ClipRectangleGuard (Renderer &renderer) | |
| Speculative constructor. More... | |
| ClipRectangleGuard (Renderer &renderer, const SDL_Rect &clip) | |
| Constructor. More... | |
| ClipRectangleGuard (Renderer &renderer, int x, int y, int w, int h) | |
| Constructor. More... | |
| ClipRectangleGuard (Renderer &renderer, const Rectangle &clip) | |
| Conditional constructor. More... | |
| ClipRectangleGuard & | operator= (SDL_Rect &clip) |
| Assign a new clip rectangle through the ClipRectangleGuard. More... | |
| ClipRectangleGuard & | operator= (Rectangle &clip) |
| Assign a new clip rectangle through the ClipRectangleGuard. More... | |
| ClipRectangleGuard & | intersection (Rectangle &clip) |
Protected Attributes | |
| Renderer & | mRenderer |
| The renderer to which the clip rectangles are set. | |
| SDL_Rect | mOldClip {} |
| The old clip rectangle. | |
Store the current clip rectangle replacing it with a new clip rectangle.
When the object is destroyed (by going out of scope) the old clip rectangle is set.
|
inlineexplicit |
Speculative constructor.
This constructor saves the current clip rectangle to be restored later, but does not set a new clip rectangle. A new clip rectangle may be set using the assignment operators.
| renderer | The renderer to guard the clip rectangle of. |
|
inline |
Constructor.
Store the current clip rectangle and set the new one.
| renderer | The renderer to set the clip rectangles on. |
| clip | The new clip rectangle. |
|
inline |
Constructor.
Store the current clip rectangle and set the new one.
| renderer | The renderer to set the clip rectangles on. |
| x | X co-ordinate of the new clip rectangle. |
| y | Y co-ordinate of the new clip rectangle. |
| w | Width of the new clip rectangle. |
| h | Height of the new clip rectangle. |
|
inline |
Conditional constructor.
This constructor saves the current clip rectangle to be restored later. If clip is valid it is converted to an SDL_Rect and set as the new clip rectangle
| renderer | The renderer to set the clip rectangles on. |
| clip | A, possibly invalid, RectangleInt. |
|
inline |
Assign a new clip rectangle through the ClipRectangleGuard.
| clip | The new clip rectangle. |
|
inline |
Assign a new clip rectangle through the ClipRectangleGuard.
If clip is invalid no changes are made.
| clip | The new clip rectangle. |
1.8.13