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, bool use_context_color=false) noexcept override;
22
23private:
24 pixel_map<sfloat_rgba16> _pixel_map;
25 pipeline_image::Image _backing;
26 aarect _pixel_map_bounding_box;
27 matrix2 _pixel_map_transform;
28};
29
30}
Definition sfloat_rgba16.hpp:17
A 2D canvas of pixels.
Definition pixel_map.hpp:99
Draw context for drawing using the TTauri shaders.
Definition draw_context.hpp:33
Definition image_stencil.hpp:11
Definition pixel_map_stencil.hpp:15
void draw(draw_context context, bool use_context_color=false) noexcept override
Draw the cell.
Definition URL.hpp:46