|
OpenEnroth 9cf7432
|
#include <HitMap.h>
Classes | |
| struct | Entry |
Public Member Functions | |
| void | add (Pointi position, GraphicsImage *image, T value) |
| void | clear () |
| T | query (Pointi point, T defaultValue={}) const |
Private Attributes | |
| std::vector< Entry > | _entries |
| Recti | _bounds |
A canvas-like container that allows adding images with associated values, then querying pixels to get the value of the topmost non-transparent image at that position.
| T | The type of values associated with images. |
|
inline |
Add an image with associated value to the canvas.
| position | Top-left position where the image should be placed. |
| image | Pointer to the graphics image. |
| value | Value to associate with this image. |
|
inline |
Clear all images from the canvas.
Query a pixel position to get the value from the topmost non-transparent image.
| point | Position to query. |
| defaultValue | Value to return if no non-transparent image is found at the position. |
defaultValue if no such image exists.