|
Smolgui
Immediate gui library based on SFML
|
Handle clipping layers to only draw things in a given box. More...
#include <ClippingLayers.h>
Public Member Functions | |
| uint32_t | initialize () |
| Initialize clipping layers with a base view. | |
| uint32_t | setCurrentLayer (const sf::FloatRect &mask) |
| Set current clipping layer used. | |
| uint32_t | activeLayer () const |
| Get current active clipping layer index. | |
| void | moveToLayer (const uint32_t layerId) |
| To reuse a previously set clipping layer. | |
| void | disable () |
| Go back to base layer with no clipping. | |
| bool | isClipped (const sf::Vector2f &position) const |
| To tell if a position is visible or not (clipped). | |
| const sf::View & | at (const uint32_t layerId) const |
| Return stored clipping layers. | |
Public Attributes | |
| sf::View | baseView = {} |
| Base view of the clipping layers. | |
Handle clipping layers to only draw things in a given box.
| uint32_t sgui::ClippingLayers::activeLayer | ( | ) | const |
Get current active clipping layer index.
| const sf::View & sgui::ClippingLayers::at | ( | const uint32_t | layerId | ) | const |
Return stored clipping layers.
| void sgui::ClippingLayers::disable | ( | ) |
Go back to base layer with no clipping.
| uint32_t sgui::ClippingLayers::initialize | ( | ) |
Initialize clipping layers with a base view.
| bool sgui::ClippingLayers::isClipped | ( | const sf::Vector2f & | position | ) | const |
To tell if a position is visible or not (clipped).
| void sgui::ClippingLayers::moveToLayer | ( | const uint32_t | layerId | ) |
To reuse a previously set clipping layer.
| uint32_t sgui::ClippingLayers::setCurrentLayer | ( | const sf::FloatRect & | mask | ) |
Set current clipping layer used.
| sf::View sgui::ClippingLayers::baseView = {} |
Base view of the clipping layers.