7#include "pipeline_flat_vertex.hpp"
8#include "pipeline_box_vertex.hpp"
9#include "pipeline_image_vertex.hpp"
10#include "pipeline_SDF_vertex.hpp"
11#include "../geometry/axis_aligned_rectangle.hpp"
12#include "../geometry/matrix.hpp"
13#include "../geometry/corner_shapes.hpp"
14#include "../geometry/identity.hpp"
15#include "../color/color.hpp"
16#include "../vspan.hpp"
20class gfx_device_vulkan;
23namespace pipeline_image {
39 size_t frame_buffer_index,
50 [[nodiscard]]
size_t frame_buffer_index()
const noexcept;
52 [[nodiscard]]
aarectangle scissor_rectangle()
const noexcept;
54 [[nodiscard]]
aarectangle clipping_rectangle()
const noexcept;
56 void set_clipping_rectangle(
aarectangle clipping_rectangle)
noexcept;
58 [[nodiscard]]
matrix3 transform()
const noexcept;
95 float line_width = 1.0,
121 float line_width = 1.0,
147 float line_width = 1.0,
174 void draw_glyph(font_glyph_ids
const &glyph, rectangle box, color text_color)
const noexcept;
176 [[nodiscard]]
friend bool overlaps(draw_context
const &context, aarectangle
const &rectangle)
noexcept
178 return overlaps(context._scissor_rectangle, rectangle);
182 gfx_device_vulkan &_device;
184 vspan<pipeline_flat::vertex> *_flat_vertices;
185 vspan<pipeline_box::vertex> *_box_vertices;
186 vspan<pipeline_image::vertex> *_image_vertices;
187 vspan<pipeline_SDF::vertex> *_sdf_vertices;
191 size_t _frame_buffer_index;
196 aarectangle _scissor_rectangle;
201 aarectangle _clipping_rectangle;
207 matrix3 _transform = geo::identity{};
This is a RGBA floating point color.
Definition color.hpp:36
Class which represents an axis-aligned rectangle.
Definition axis_aligned_rectangle.hpp:20
Definition corner_shapes.hpp:9
Definition identity.hpp:11
Class which represents an rectangle.
Definition rectangle.hpp:16
Draw context for drawing using the TTauri shaders.
Definition draw_context.hpp:29
void draw_image(pipeline_image::image &image, matrix3 image_transform) const noexcept
Draw an image This function will draw an image.
void draw_filled_quad(rectangle r, color fill_color) const noexcept
Draw a rectangle of one color.
void draw_filled_quad(point3 p1, point3 p2, point3 p3, point3 p4, color fill_color) const noexcept
Draw a polygon with four corners of one color.
void draw_box_with_border_inside(rectangle rectangle, color fill_color, color line_color, float line_width=1.0, tt::corner_shapes corner_shapes=tt::corner_shapes{}) const noexcept
Draw an axis aligned box This function will shrink to include the size of the border inside the given...
void draw_text(shaped_text const &text, std::optional< color > text_color={}, matrix3 transform=geo::identity{}) const noexcept
Draw shaped text.
void draw_box_with_border_outside(rectangle rectangle, color fill_color, color line_color, float line_width=1.0, tt::corner_shapes corner_shapes=tt::corner_shapes{}) const noexcept
Draw an axis aligned box This function will expand to include the size of the border outside the give...
void draw_box(rectangle box, color fill_color, color line_color, float line_width=1.0, tt::corner_shapes corner_shapes=tt::corner_shapes{}) const noexcept
Draw an axis aligned box This function will draw the given box.
Definition gfx_device.hpp:22
Definition gfx_device_vulkan.hpp:24
This is a image that is uploaded into the texture atlas.
Definition pipeline_image_image.hpp:30
shaped_text represent a piece of text shaped to be displayed.
Definition shaped_text.hpp:23