|
HikoGUI
A low latency retained GUI
|
#include <TTauri/GUI/DrawContext.hpp>
Public Member Functions | |
| DrawContext (Window &window, vspan< PipelineFlat::Vertex > &flatVertices, vspan< PipelineBox::Vertex > &boxVertices, vspan< PipelineImage::Vertex > &imageVertices, vspan< PipelineSDF::Vertex > &sdfVertices) noexcept | |
| DrawContext (DrawContext const &rhs) noexcept=default | |
| DrawContext (DrawContext &&rhs) noexcept=default | |
| DrawContext & | operator= (DrawContext const &rhs) noexcept=default |
| DrawContext & | operator= (DrawContext &&rhs) noexcept=default |
| Window & | window () const noexcept |
| GUIDevice & | device () const noexcept |
| void | drawFilledQuad (vec p1, vec p2, vec p3, vec p4) const noexcept |
| Draw a polygon with four corners of one color. | |
| void | drawFilledQuad (aarect r) const noexcept |
| Draw a rectangle of one color. | |
| void | drawBox (aarect box) const noexcept |
| Draw an axis aligned box This function will draw the given box. | |
| 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 rectangle. | |
| void | drawImage (PipelineImage::Image &image) const noexcept |
| Draw an image This function will draw an image. | |
| void | drawText (ShapedText const &text) const noexcept |
| Draw shaped text. | |
| void | drawTextSingleColor (ShapedText const &text) const noexcept |
| Draw shaped text. | |
| void | drawGlyph (FontGlyphIDs const &glyph, aarect box) const noexcept |
Data Fields | |
| vec | color = vec::color(1.0, 1.0, 1.0, 1.0) |
| Foreground color. | |
| vec | fillColor = vec::color(0.0, 0.0, 0.0, 0.0) |
| Fill color. | |
| float | lineWidth = 1.0 |
| Size of lines. | |
| vec | cornerShapes = vec{0.0, 0.0, 0.0, 0.0} |
| Shape of the corners of a box. | |
| aarect | clippingRectangle |
| The clipping rectangle when drawing. | |
| mat | transform = mat::I() |
| Transform used on the given coordinates. | |
Draw context for drawing using the TTauri shaders.
|
inlinenoexcept |
Draw an axis aligned box This function will draw the given box.
This will use the current:
|
inlinenoexcept |
Draw an axis aligned box This function will shrink to include the size of the border within the given rectangle.
This will make the border be drawn sharply.
This will also adjust rounded corners to the shrunk box.
This function will draw the given box. This will use the current:
|
inlinenoexcept |
Draw a rectangle of one color.
This function will draw the given rectangle. This will use the current:
Draw a polygon with four corners of one color.
This function will draw a polygon between the four given points. This will use the current:
|
inlinenoexcept |
Draw an image This function will draw an image.
This will use the current:
|
inlinenoexcept |
Draw shaped text.
This function will draw the shaped text. The SDF-image-atlas needs to be prepared ahead of time. This will use the current:
|
inlinenoexcept |
Draw shaped text.
This function will draw the shaped text. The SDF-image-atlas needs to be prepared ahead of time. This will use the current:
| aarect tt::DrawContext::clippingRectangle |
The clipping rectangle when drawing.
The clipping rectangle is passes as-is to the pipelines and is not modified by the transform.
| vec tt::DrawContext::color = vec::color(1.0, 1.0, 1.0, 1.0) |
Foreground color.
Shape of the corners of a box.
The vector holds information for each corner:
The value means:
| vec tt::DrawContext::fillColor = vec::color(0.0, 0.0, 0.0, 0.0) |
Fill color.
| float tt::DrawContext::lineWidth = 1.0 |
Size of lines.
Transform used on the given coordinates.
The z-axis translate is used for specifying the elevation (inverse depth buffer) of the shape.