HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::draw_attributes Struct Reference

#include <hikogui/GFX/draw_context_intf.hpp>

Public Member Functions

constexpr draw_attributes (draw_attributes const &) noexcept=default
constexpr draw_attributes (draw_attributes &&) noexcept=default
constexpr draw_attributes & operator= (draw_attributes const &) noexcept=default
constexpr draw_attributes & operator= (draw_attributes &&) noexcept=default
template<draw_attribute... Args>
constexpr draw_attributes (Args const &...args) noexcept
 Construct the draw attributes based on types and order of the attributes.
constexpr void add () noexcept
template<draw_attribute T>
constexpr void add (T const &attribute) noexcept
template<draw_attribute First, draw_attribute Second, draw_attribute... Rest>
constexpr void add (First const &first, Second const &second, Rest const &...rest) noexcept

Data Fields

unsigned char num_colors = 0
unsigned char num_line_caps = 0
quad_color fill_color = {}
 The fill color used for the color of a box inside the border.
quad_color line_color = {}
 The line color used for the color of the border of the box.
float line_width = 0.0f
 The width of a line, or the width of a border.
hi::border_side border_side = hi::border_side::on
 The side on which side of the edge of a shape the border should be drawn.
hi::corner_radii corner_radius = {}
 The radii of each corner of a quad.
aarectangle clipping_rectangle = aarectangle::large()
 The rectangle used the clip the shape when drawing.
line_end_cap begin_line_cap = line_end_cap::flat
 The shape of the beginning of a line.
line_end_cap end_line_cap = line_end_cap::flat
 The shape of the beginning of a line.

Detailed Description

The draw attributes used to draw shaped into the draw context.

Constructor & Destructor Documentation

◆ draw_attributes()

template<draw_attribute... Args>
hi::v1::draw_attributes::draw_attributes ( Args const &... args)
inlineconstexprnoexcept

Construct the draw attributes based on types and order of the attributes.

The following order of attributes is maintained:

Parameters
argsThe attributes to be set.

Field Documentation

◆ begin_line_cap

line_end_cap hi::v1::draw_attributes::begin_line_cap = line_end_cap::flat

The shape of the beginning of a line.

◆ border_side

hi::border_side hi::v1::draw_attributes::border_side = hi::border_side::on

The side on which side of the edge of a shape the border should be drawn.

◆ clipping_rectangle

aarectangle hi::v1::draw_attributes::clipping_rectangle = aarectangle::large()

The rectangle used the clip the shape when drawing.

This rectangle is used for limiting drawing outside of a widget's rectangle. But it may also be used to cut shapes for special effects.

◆ corner_radius

hi::corner_radii hi::v1::draw_attributes::corner_radius = {}

The radii of each corner of a quad.

◆ end_line_cap

line_end_cap hi::v1::draw_attributes::end_line_cap = line_end_cap::flat

The shape of the beginning of a line.

◆ fill_color

quad_color hi::v1::draw_attributes::fill_color = {}

The fill color used for the color of a box inside the border.

This is also used as the line-color when drawing lines. Or the color of the text. And the color for the primary cursor.

◆ line_color

quad_color hi::v1::draw_attributes::line_color = {}

The line color used for the color of the border of the box.

This is also used as the color for the secondary cursor.

◆ line_width

float hi::v1::draw_attributes::line_width = 0.0f

The width of a line, or the width of a border.


The documentation for this struct was generated from the following file: