HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
pixel_map_stencil.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "image_stencil.hpp"
8#include "../GUI/pipeline_image_image.hpp"
9#include "../pixel_map.hpp"
10#include "../color/sfloat_rgba16.hpp"
11#include "../URL.hpp"
12
13namespace tt {
14
16public:
17 pixel_map_stencil(tt::alignment alignment, pixel_map<sfloat_rgba16> &&pixel_map);
18 pixel_map_stencil(tt::alignment alignment, pixel_map<sfloat_rgba16> const &pixel_map);
19 pixel_map_stencil(tt::alignment alignment, URL const &url);
20
21 void draw(draw_context context, tt::color color, matrix3 transform) noexcept override;
22
23private:
24 pixel_map<sfloat_rgba16> _pixel_map;
25 pipeline_image::Image _backing;
26 aarectangle _pixel_map_bounding_box;
27 matrix2 _pixel_map_transform;
28};
29
30}
This is a RGBA floating point color.
Definition color.hpp:39
Class which represents an axis-aligned rectangle.
Definition axis_aligned_rectangle.hpp:18
A 2D canvas of pixels.
Definition pixel_map.hpp:100
Draw context for drawing using the TTauri shaders.
Definition draw_context.hpp:33
This is a image that is uploaded into the texture atlas.
Definition pipeline_image_image.hpp:28
Definition image_stencil.hpp:11
Definition pixel_map_stencil.hpp:15
void draw(draw_context context, tt::color color, matrix3 transform) noexcept override
Draw the cell.
Definition URL.hpp:46