|
HikoGUI
A low latency retained GUI
|
#include <hikogui/GFX/draw_context.hpp>
Public Member Functions | |
| draw_context (draw_context const &rhs) noexcept=default | |
| draw_context (draw_context &&rhs) noexcept=default | |
| draw_context & | operator= (draw_context const &rhs) noexcept=default |
| draw_context & | operator= (draw_context &&rhs) noexcept=default |
| draw_context (gfx_device_vulkan &device, vspan< pipeline_box::vertex > &boxVertices, vspan< pipeline_image::vertex > &imageVertices, vspan< pipeline_SDF::vertex > &sdfVertices) noexcept | |
| operator bool () const noexcept | |
| Check if the draw_context should be used for rendering. | |
| void | draw_box (widget_layout const &layout, quad const &box, quad_color const &fill_color, quad_color const &border_color, float border_width, hi::border_side border_side, hi::corner_radii const &corner_radius={}) const noexcept |
| Draw a box with rounded corners. | |
| void | draw_box (widget_layout const &layout, aarectangle const &clipping_rectangle, quad const &box, quad_color const &fill_color, quad_color const &border_color, float border_width, hi::border_side border_side, hi::corner_radii const &corner_radius={}) const noexcept |
| Draw a box with rounded corners. | |
| void | draw_box (widget_layout const &layout, quad const &box, quad_color const &fill_color, hi::corner_radii const &corner_radius={}) const noexcept |
| Draw a box with rounded corners without a border. | |
| void | draw_box (widget_layout const &layout, aarectangle const &clipping_rectangle, quad const &box, quad_color const &fill_color, hi::corner_radii const &corner_radius={}) const noexcept |
| Draw a box with rounded corners without a border. | |
| void | draw_line (widget_layout const &layout, line_segment const &line, float width, quad_color const &fill_color, line_end_cap c1=line_end_cap::flat, line_end_cap c2=line_end_cap::flat) const noexcept |
| void | draw_line (widget_layout const &layout, aarectangle const &clipping_rectangle, line_segment const &line, float width, quad_color const &fill_color, line_end_cap c1=line_end_cap::flat, line_end_cap c2=line_end_cap::flat) const noexcept |
| void | draw_circle (widget_layout const &layout, hi::circle const &circle, quad_color const &fill_color) const noexcept |
| void | draw_circle (widget_layout const &layout, aarectangle const clipping_rectangle, hi::circle const &circle, quad_color const &fill_color) const |
| void | draw_circle (widget_layout const &layout, hi::circle const &circle, quad_color const &fill_color, quad_color const &border_color, float border_width, hi::border_side border_side) const noexcept |
| void | draw_circle (widget_layout const &layout, aarectangle const &clipping_rectangle, hi::circle const &circle, quad_color const &fill_color, quad_color const &border_color, float border_width, hi::border_side border_side) const noexcept |
| bool | draw_image (widget_layout const &layout, quad const &box, paged_image &image) const noexcept |
| Draw an image. | |
| bool | draw_image (widget_layout const &layout, aarectangle const &clipping_rectangle, quad const &box, paged_image &image) const noexcept |
| Draw an image. | |
| void | draw_glyph (widget_layout const &layout, quad const &box, quad_color const &color, glyph_ids const &glyph) const noexcept |
| Draw a glyph. | |
| void | draw_glyph (widget_layout const &layout, aarectangle clipping_rectangle, quad const &box, quad_color const &color, glyph_ids const &glyph) const noexcept |
| Draw a glyph. | |
| void | draw_text (widget_layout const &layout, matrix3 const &transform, quad_color const &color, shaped_text const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, aarectangle const &clipping_rectangle, matrix3 const &transform, quad_color const &color, shaped_text const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, matrix3 const &transform, shaped_text const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, matrix3 const &transform, quad_color const &color, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, quad_color const &color, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, aarectangle const &clipping_rectangle, matrix3 const &transform, quad_color const &color, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, aarectangle const &clipping_rectangle, quad_color const &color, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, matrix3 const &transform, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text (widget_layout const &layout, text_shaper const &text) const noexcept |
| Draw shaped text. | |
| void | draw_text_selection (widget_layout const &layout, text_shaper const &text, text_selection const &selection, hi::color color) const noexcept |
| Draw text-selection of shaped text. | |
| void | draw_text_cursors (widget_layout const &layout, text_shaper const &text, text_cursor cursor, hi::color primary_color, hi::color secondary_color, bool overwrite_mode, bool dead_character_mode) const noexcept |
| Draw text cursors of shaped text. | |
Static Public Member Functions | |
| static constexpr rectangle | make_rectangle (line_segment const &line, float width, line_end_cap c1, line_end_cap c2) noexcept |
| static constexpr corner_radii | make_corner_radii (float width, line_end_cap c1, line_end_cap c2) noexcept |
| static constexpr rectangle | make_rectangle (hi::circle const &circle) noexcept |
| static constexpr corner_radii | make_corner_radii (hi::circle const &circle) noexcept |
Data Fields | |
| gfx_device_vulkan & | device |
| std::size_t | frame_buffer_index |
| The frame buffer index of the image we are currently rendering. | |
| aarectangle | scissor_rectangle |
| This is the rectangle of the window that is being redrawn. | |
| color | background_color |
| The background color to clear the window with. | |
| hi::subpixel_orientation | subpixel_orientation |
| The subpixel orientation for rendering glyphs. | |
| float | saturation |
| The tone-mapper's saturation. | |
| utc_nanoseconds | display_time_point |
| The time when the drawing will appear on the screen. | |
Friends | |
| bool | overlaps (draw_context const &context, widget_layout const &layout) noexcept |
Draw context for drawing using the HikoGUI shaders.
|
inlinenoexcept |
Draw a box with rounded corners without a border.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| box | The four points of the box to draw. |
| fill_color | The fill color of the inside of the box. |
| corner_radius | The corner radii of each corner of the box. |
|
inlinenoexcept |
Draw a box with rounded corners.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| box | The four points of the box to draw. |
| fill_color | The fill color of the inside of the box. |
| border_color | The line color of the border of the box. |
| border_width | The line width of the border. |
| border_side | The side of the edge where the border is drawn. |
| corner_radius | The corner radii of each corner of the box. |
|
inlinenoexcept |
Draw a box with rounded corners without a border.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| box | The four points of the box to draw. |
| fill_color | The fill color of the inside of the box. |
| corner_radius | The corner radii of each corner of the box. |
|
inlinenoexcept |
Draw a box with rounded corners.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| box | The four points of the box to draw. |
| fill_color | The fill color of the inside of the box. |
| border_color | The line color of the border of the box. |
| border_width | The line width of the border. |
| border_side | The side of the edge where the border is drawn. |
| corner_radius | The corner radii of each corner of the box. |
|
inlinenoexcept |
Draw a glyph.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| box | The size and position of the glyph. |
| color | The color that the glyph should be drawn in. |
| glyph | The glyphs to draw. |
|
inlinenoexcept |
Draw a glyph.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| box | The size and position of the glyph. |
| color | The color that the glyph should be drawn in. |
| glyph | The glyphs to draw. |
|
inlinenoexcept |
Draw an image.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| box | The four points of the box to draw. |
| image | The image to show. |
|
inlinenoexcept |
Draw an image.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| box | The four points of the box to draw. |
| image | The image to show. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| transform | How to transform the shaped text relative to layout. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| transform | How to transform the shaped text relative to layout. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| clipping_rectangle | A more narrow clipping rectangle than supplied by layout. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| transform | How to transform the shaped text relative to layout. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| transform | How to transform the shaped text relative to layout. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| transform | How to transform the shaped text relative to layout. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| transform | How to transform the shaped text relative to layout. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| color | Text-color overriding the colors from the shaped_text. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| text | The shaped text to draw. |
|
inlinenoexcept |
Draw text cursors of shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| text | The shaped text to draw. |
| cursor | The position of the cursor. |
| primary_color | The color of the primary cursor (the insertion cursor). |
| secondary_color | The color of the secondary cursor (the append cursor). |
| overwrite_mode | If true draw overwrite mode cursor; if false draw insertion mode cursors, |
| dead_character_mode | If true draw the dead-character cursor. The dead_character_mode overrides all other cursors. |
|
inlinenoexcept |
Draw text-selection of shaped text.
| layout | The layout to use, specifically the to_window transformation matrix and the clipping rectangle. |
| text | The shaped text to draw. |
| selection | The text selection. |
| color | The color of the selection. |
|
inlinenoexcept |
Check if the draw_context should be used for rendering.
| color v1::draw_context::background_color |
The background color to clear the window with.
| utc_nanoseconds v1::draw_context::display_time_point |
The time when the drawing will appear on the screen.
| std::size_t v1::draw_context::frame_buffer_index |
The frame buffer index of the image we are currently rendering.
| float v1::draw_context::saturation |
The tone-mapper's saturation.
| aarectangle v1::draw_context::scissor_rectangle |
This is the rectangle of the window that is being redrawn.
| hi::subpixel_orientation v1::draw_context::subpixel_orientation |
The subpixel orientation for rendering glyphs.