7#include "TTauri/Foundation/vec.hpp"
8#include "TTauri/Foundation/mat.hpp"
9#include "TTauri/Foundation/aarect.hpp"
10#include "TTauri/Foundation/vspan.hpp"
11#include "TTauri/GUI/GUIDevice.hpp"
12#include "TTauri/GUI/Window.hpp"
13#include "TTauri/GUI/Theme.hpp"
14#include "TTauri/GUI/PipelineImage_Image.hpp"
15#include "TTauri/GUI/PipelineFlat_DeviceShared.hpp"
16#include "TTauri/GUI/PipelineBox_DeviceShared.hpp"
17#include "TTauri/GUI/PipelineImage_DeviceShared.hpp"
18#include "TTauri/GUI/PipelineSDF_DeviceShared.hpp"
19#include "TTauri/GUI/PipelineFlat_Vertex.hpp"
20#include "TTauri/GUI/PipelineBox_Vertex.hpp"
21#include "TTauri/GUI/PipelineImage_Vertex.hpp"
22#include "TTauri/GUI/PipelineSDF_Vertex.hpp"
23#include "TTauri/Text/ShapedText.hpp"
82 flatVertices(&flatVertices),
83 boxVertices(&boxVertices),
84 imageVertices(&imageVertices),
85 sdfVertices(&sdfVertices),
86 color(0.0, 1.0, 0.0, 1.0),
94 imageVertices.clear();
104 Window &window() const noexcept {
109 GUIDevice &device() const noexcept {
110 auto device = window().device;
123 tt_assume(flatVertices !=
nullptr);
138 drawFilledQuad(r.corner<0>(), r.corner<1>(), r.corner<2>(), r.corner<3>());
153 tt_assume(boxVertices !=
nullptr);
155 PipelineBox::DeviceShared::placeVertices(
184 tt_assume(boxVertices !=
nullptr);
188 ttlet newBox = shrink(box, shrink_value);
190 ttlet newCornerShapes =
vec{
197 PipelineBox::DeviceShared::placeVertices(
215 tt_assume(imageVertices !=
nullptr);
228 tt_assume(sdfVertices !=
nullptr);
230 device().SDFPipeline->placeVertices(
246 tt_assume(sdfVertices !=
nullptr);
248 device().SDFPipeline->placeVertices(
258 tt_assume(sdfVertices !=
nullptr);
260 device().SDFPipeline->placeVertices(
Class which represents an axis-aligned rectangle.
Definition aarect.hpp:13
A 4x4 matrix.
Definition mat.hpp:18
static mat I() noexcept
Create an identity matrix.
Definition mat.hpp:482
A 4D vector.
Definition vec.hpp:37
static tt_force_inline vec color(float r, float g, float b, float a=1.0f) noexcept
Create a color out of 3 to 4 values.
Definition vec.hpp:226
Draw context for drawing using the TTauri shaders.
Definition DrawContext.hpp:30
float lineWidth
Size of lines.
Definition DrawContext.hpp:46
mat transform
Transform used on the given coordinates.
Definition DrawContext.hpp:72
void drawFilledQuad(vec p1, vec p2, vec p3, vec p4) const noexcept
Draw a polygon with four corners of one color.
Definition DrawContext.hpp:122
vec cornerShapes
Shape of the corners of a box.
Definition DrawContext.hpp:60
void drawBoxIncludeBorder(aarect box) const noexcept
Draw an axis aligned box This function will shrink to include the size of the border within the given...
Definition DrawContext.hpp:182
void drawTextSingleColor(ShapedText const &text) const noexcept
Draw shaped text.
Definition DrawContext.hpp:245
aarect clippingRectangle
The clipping rectangle when drawing.
Definition DrawContext.hpp:66
vec color
Foreground color.
Definition DrawContext.hpp:40
vec fillColor
Fill color.
Definition DrawContext.hpp:43
void drawBox(aarect box) const noexcept
Draw an axis aligned box This function will draw the given box.
Definition DrawContext.hpp:152
void drawImage(PipelineImage::Image &image) const noexcept
Draw an image This function will draw an image.
Definition DrawContext.hpp:214
void drawText(ShapedText const &text) const noexcept
Draw shaped text.
Definition DrawContext.hpp:227
void drawFilledQuad(aarect r) const noexcept
Draw a rectangle of one color.
Definition DrawContext.hpp:137
This is a image that is uploaded into the texture atlas.
Definition PipelineImage_Image.hpp:31
static constexpr float borderWidth
The line-width of a border.
Definition Theme.hpp:39
Definition Window_vulkan_win32.hpp:15
Definition FontGlyphIDs.hpp:77
ShapedText represent a piece of text shaped to be displayed.
Definition ShapedText.hpp:21