CYD-UI
A C++ library for building native graphic user interfaces
Loading...
Searching...
No Matches
cydui.graphics.vector.attributes Module Reference

Exported Modules

module  cydui.graphics.pixelmap_editor
 
module  quantify
 

Classes

struct  vg::paint::base_i
 
struct  vg::paint::solid
 
struct  vg::paint::gradient::linear
 
struct  vg::paint::gradient::radial
 
struct  vg::paint::type
 
struct  vg::attribute_i
 
struct  vg::attr_id< E >
 id More...
 
struct  vg::attr_style_class< E >
 class More...
 
struct  vg::attr_x< E >
 x - x-axis coordinate More...
 
struct  vg::attr_y< E >
 y - y-axis coordinate More...
 
struct  vg::attr_r< E >
 r - radius More...
 
struct  vg::attr_rx< E >
 rx - radius in x-axis More...
 
struct  vg::attr_ry< E >
 ry - radius in y-axis More...
 
struct  vg::attr_x1< E >
 x1 - 1st point x-axis coordinate More...
 
struct  vg::attr_y1< E >
 y1 - 1st point y-axis coordinate More...
 
struct  vg::attr_x2< E >
 x2 - 2nd point x-axis coordinate More...
 
struct  vg::attr_y2< E >
 y2 - 2nd point y-axis coordinate More...
 
struct  vg::attr_cx< E >
 cx - center x-axis coordinate More...
 
struct  vg::attr_cy< E >
 cy - center y-axis coordinate More...
 
struct  vg::attr_rotate< E >
 rotate - angle of rotation in degrees More...
 
struct  vg::attr_pivot_x< E >
 pivot_x - rotate pivot x-axis coordinate More...
 
struct  vg::attr_pivot_y< E >
 pivot_y - rotate pivot y-axis coordinate More...
 
struct  vg::attr_a1< E >
 a1 - 1st angle in arcs in degrees More...
 
struct  vg::attr_a2< E >
 a1 - 2st angle in arcs in degrees More...
 
struct  vg::attr_scale_x< E >
 rotate - angle of rotation in degrees More...
 
struct  vg::attr_scale_y< E >
 rotate - angle of rotation in degrees More...
 
struct  vg::attr_points< E >
 points More...
 
struct  vg::attr_path_str< E >
 d - path str More...
 
struct  vg::attr_w< E >
 width More...
 
struct  vg::attr_h< E >
 height More...
 
struct  vg::attr_hidden< E >
 hidden - replaces display="none" from SVG More...
 
struct  vg::attr_opacity< E >
 opacity More...
 
struct  vg::attr_stroke< E >
 stroke More...
 
struct  vg::attr_stroke_dasharray< E >
 stroke-dasharray More...
 
struct  vg::attr_stroke_dashoffset< E >
 stroke-dashoffset More...
 
struct  vg::attr_stroke_linecap< E >
 stroke-linecap More...
 
struct  vg::attr_stroke_linejoin< E >
 stroke-linejoin More...
 
struct  vg::attr_stroke_miterlimit< E >
 stroke-miterlimit More...
 
struct  vg::attr_stroke_opacity< E >
 stroke-opacity More...
 
struct  vg::attr_stroke_width< E >
 stroke-width More...
 
struct  vg::attr_font_family< E >
 font-family More...
 
struct  vg::attr_font_size< E >
 font-size More...
 
struct  vg::attr_font_stretch< E >
 font-stretch More...
 
struct  vg::attr_font_style< E >
 font-style More...
 
struct  vg::attr_font_weight< E >
 font-weight More...
 
struct  vg::attr_text_anchor< E >
 text-anchor More...
 
struct  vg::text_decoration_t
 
struct  vg::attr_text_decoration< E >
 text-decoration More...
 
struct  vg::attr_fill< E >
 fill More...
 
struct  vg::attr_fill_opacity< E >
 fill-opacity More...
 
struct  vg::attr_fill_rule< E >
 fill-rule More...
 
struct  vg::attrs_stroke< T >
 
struct  vg::attrs_fill< T >
 
struct  vg::attrs_font< T >
 
struct  vg::attrs_core< T >
 

Enumerations

enum  vg::paint::paint_type_e { vg::paint::SOLID , vg::paint::GRADIENT_LINEAR , vg::paint::GRADIENT_RADIAL }
 
enum class  vg::text_anchor_e { START , MIDDLE , END }
 

Typedefs

using vg::point_list_t = std::vector<std::array<int, 2>>
 
using vg::stroke_linecap_e = Cairo::Context::LineCap
 
using vg::stroke_linejoin_e = Cairo::Context::LineJoin
 
using vg::font_style_e = Cairo::ToyFontFace::Slant
 UNUSED.
 
using vg::font_weight_e = Cairo::ToyFontFace::Weight
 
using vg::fill_rule_e = Cairo::Context::FillRule
 

Functions

virtual ~base_i ()=default
 
virtual void apply_to_source (pixelmap_editor_t &editor, double opacity) const =0
 
virtual color::Color sample (int x, int y) const =0
 
virtual base_imake_copy () const =0
 
virtual paint_type_e get_type () const =0
 
virtual bool operator== (const base_i &rhl) const =0
 
 solid ()=default
 
 solid (color::Color _c)
 
void apply_to_source (pixelmap_editor_t &editor, double opacity) const override
 
color::Color sample (int x, int y) const override
 
base_imake_copy () const override
 
paint_type_e get_type () const override
 
bool operator== (const base_i &rhl) const override
 
 linear (std::pair< int, int > start, std::pair< int, int > end, const std::vector< std::pair< double, color::Color > > &_color_stops)
 
void apply_to_source (pixelmap_editor_t &editor, double opacity) const override
 
color::Color sample (int x, int y) const override
 
base_imake_copy () const override
 
paint_type_e get_type () const override
 
bool operator== (const paint::base_i &rhl_) const override
 
 radial (std::pair< int, int > start, int r0, std::pair< int, int > end, int r1, const std::vector< std::pair< double, color::Color > > &_color_stops)
 
void apply_to_source (pixelmap_editor_t &editor, double opacity) const override
 
color::Color sample (int x, int y) const override
 
base_imake_copy () const override
 
paint_type_e get_type () const override
 
bool operator== (const paint::base_i &rhl_) const override
 
 type (decltype(paint_type) type_, std::unique_ptr< base_i > &&paint_data_)
 
template<typename Paint>
static type make (Paint paint_data_)
 
 type (const type &rhl)
 
typeoperator= (const type &rhl)
 
bool operator== (const type &rhl) const
 
E & id (std::string &_id_)
 
E & id (std::string &&_id_)
 
E & style_class (std::vector< std::string > &_style_class_)
 
E & style_class (std::vector< std::string > &&_style_class_)
 
template<typename UNIT, typename T>
E & x (const quantify::quantity_t< UNIT, T > &_x_)
 
template<typename UNIT, typename T>
E & x (quantify::quantity_t< UNIT, T > &&_x_)
 
E & x (const int &_x_)
 
E & x (int &&_x_)
 
template<typename UNIT, typename T>
E & y (const quantify::quantity_t< UNIT, T > &_y_)
 
template<typename UNIT, typename T>
E & y (quantify::quantity_t< UNIT, T > &&_y_)
 
E & y (const int &_y_)
 
E & y (int &&_y_)
 
template<typename UNIT, typename T>
E & r (const quantify::quantity_t< UNIT, T > &_r_)
 
template<typename UNIT, typename T>
E & r (quantify::quantity_t< UNIT, T > &&_r_)
 
E & r (const int &_r_)
 
E & r (int &&_r_)
 
template<typename UNIT, typename T>
E & rx (const quantify::quantity_t< UNIT, T > &_rx_)
 
template<typename UNIT, typename T>
E & rx (quantify::quantity_t< UNIT, T > &&_rx_)
 
E & rx (const int &_rx_)
 
E & rx (int &&_rx_)
 
template<typename UNIT, typename T>
E & ry (const quantify::quantity_t< UNIT, T > &_ry_)
 
template<typename UNIT, typename T>
E & ry (quantify::quantity_t< UNIT, T > &&_ry_)
 
E & ry (const int &_ry_)
 
E & ry (int &&_ry_)
 
template<typename UNIT, typename T>
E & x1 (const quantify::quantity_t< UNIT, T > &_x1_)
 
template<typename UNIT, typename T>
E & x1 (quantify::quantity_t< UNIT, T > &&_x1_)
 
E & x1 (const int &_x1_)
 
E & x1 (int &&_x1_)
 
template<typename UNIT, typename T>
E & y1 (const quantify::quantity_t< UNIT, T > &_y1_)
 
template<typename UNIT, typename T>
E & y1 (quantify::quantity_t< UNIT, T > &&_y1_)
 
E & y1 (const int &_y1_)
 
E & y1 (int &&_y1_)
 
template<typename UNIT, typename T>
E & x2 (const quantify::quantity_t< UNIT, T > &_x2_)
 
template<typename UNIT, typename T>
E & x2 (quantify::quantity_t< UNIT, T > &&_x2_)
 
E & x2 (const int &_x2_)
 
E & x2 (int &&_x2_)
 
template<typename UNIT, typename T>
E & y2 (const quantify::quantity_t< UNIT, T > &_y2_)
 
template<typename UNIT, typename T>
E & y2 (quantify::quantity_t< UNIT, T > &&_y2_)
 
E & y2 (const int &_y2_)
 
E & y2 (int &&_y2_)
 
template<typename UNIT, typename T>
E & cx (const quantify::quantity_t< UNIT, T > &_cx_)
 
template<typename UNIT, typename T>
E & cx (quantify::quantity_t< UNIT, T > &&_cx_)
 
E & cx (const int &_cx_)
 
E & cx (int &&_cx_)
 
template<typename UNIT, typename T>
E & cy (const quantify::quantity_t< UNIT, T > &_cy_)
 
template<typename UNIT, typename T>
E & cy (quantify::quantity_t< UNIT, T > &&_cy_)
 
E & cy (const int &_cy_)
 
E & cy (int &&_cy_)
 
E & rotate (double &_rotate_)
 
E & rotate (double &&_rotate_)
 
template<typename UNIT, typename T>
E & pivot_x (const quantify::quantity_t< UNIT, T > &_pivot_x_)
 
template<typename UNIT, typename T>
E & pivot_x (quantify::quantity_t< UNIT, T > &&_pivot_x_)
 
E & pivot_x (const int &_pivot_x_)
 
E & pivot_x (int &&_pivot_x_)
 
template<typename UNIT, typename T>
E & pivot_y (const quantify::quantity_t< UNIT, T > &_pivot_y_)
 
template<typename UNIT, typename T>
E & pivot_y (quantify::quantity_t< UNIT, T > &&_pivot_y_)
 
E & pivot_y (const int &_pivot_y_)
 
E & pivot_y (int &&_pivot_y_)
 
E & a1 (double &_a1_)
 
E & a1 (double &&_a1_)
 
E & a2 (double &_a2_)
 
E & a2 (double &&_a2_)
 
E & scale_x (double &_scale_x_)
 
E & scale_x (double &&_scale_x_)
 
E & scale_y (double &_scale_y_)
 
E & scale_y (double &&_scale_y_)
 
E & points (point_list_t &_points_)
 
E & points (point_list_t &&_points_)
 
E & path_str (std::string &_path_str_)
 
E & path_str (std::string &&_path_str_)
 
template<typename UNIT, typename T>
E & w (const quantify::quantity_t< UNIT, T > &_w_)
 
template<typename UNIT, typename T>
E & w (quantify::quantity_t< UNIT, T > &&_w_)
 
E & w (const int &_w_)
 
E & w (int &&_w_)
 
template<typename UNIT, typename T>
E & h (const quantify::quantity_t< UNIT, T > &_h_)
 
template<typename UNIT, typename T>
E & h (quantify::quantity_t< UNIT, T > &&_h_)
 
E & h (const int &_h_)
 
E & h (int &&_h_)
 
E & hidden (bool &_hidden_)
 
E & hidden (bool &&_hidden_)
 
E & opacity (float &_opacity_)
 
E & opacity (float &&_opacity_)
 
E & stroke (vg::paint::type &_stroke_)
 
E & stroke (vg::paint::type &&_stroke_)
 
E & stroke (vg::paint::solid &_stroke_)
 
E & stroke (vg::paint::solid &&_stroke_)
 
E & stroke (vg::paint::gradient::linear &_stroke_)
 
E & stroke (vg::paint::gradient::linear &&_stroke_)
 
E & stroke (vg::paint::gradient::radial &_stroke_)
 
E & stroke (vg::paint::gradient::radial &&_stroke_)
 
E & stroke_dasharray (std::valarray< double > &_stroke_dasharray_)
 
E & stroke_dasharray (std::valarray< double > &&_stroke_dasharray_)
 
E & stroke_dashoffset (double &_stroke_dashoffset_)
 
E & stroke_dashoffset (double &&_stroke_dashoffset_)
 
E & stroke_linecap (stroke_linecap_e &_stroke_linecap_)
 
E & stroke_linecap (stroke_linecap_e &&_stroke_linecap_)
 
E & stroke_linejoin (stroke_linejoin_e &_stroke_linejoin_)
 
E & stroke_linejoin (stroke_linejoin_e &&_stroke_linejoin_)
 
E & stroke_miterlimit (int &_stroke_miterlimit_)
 
E & stroke_miterlimit (int &&_stroke_miterlimit_)
 
E & stroke_opacity (float &_stroke_opacity_)
 
E & stroke_opacity (float &&_stroke_opacity_)
 
template<typename UNIT, typename T>
E & stroke_width (const quantify::quantity_t< UNIT, T > &_stroke_width_)
 
template<typename UNIT, typename T>
E & stroke_width (quantify::quantity_t< UNIT, T > &&_stroke_width_)
 
E & stroke_width (const int &_stroke_width_)
 
E & stroke_width (int &&_stroke_width_)
 
E & font_family (std::string &_font_family_)
 
E & font_family (std::string &&_font_family_)
 
E & font_size (int &_font_size_)
 
E & font_size (int &&_font_size_)
 
E & font_stretch (double &_font_stretch_)
 
E & font_stretch (double &&_font_stretch_)
 
E & font_style (font_style_e &_font_style_)
 
E & font_style (font_style_e &&_font_style_)
 
E & font_weight (font_weight_e &_font_weight_)
 
E & font_weight (font_weight_e &&_font_weight_)
 
E & text_anchor (text_anchor_e &_text_anchor_)
 
E & text_anchor (text_anchor_e &&_text_anchor_)
 
E & text_decoration (text_decoration_t &_text_decoration_)
 
E & text_decoration (text_decoration_t &&_text_decoration_)
 
E & fill (vg::paint::type &_fill_)
 
E & fill (vg::paint::type &&_fill_)
 
E & fill (vg::paint::solid &_fill_)
 
E & fill (vg::paint::solid &&_fill_)
 
E & fill (vg::paint::gradient::linear &_fill_)
 
E & fill (vg::paint::gradient::linear &&_fill_)
 
E & fill (vg::paint::gradient::radial &_fill_)
 
E & fill (vg::paint::gradient::radial &&_fill_)
 
E & fill_opacity (double &_fill_opacity_)
 
E & fill_opacity (double &&_fill_opacity_)
 
E & fill_rule (fill_rule_e &_fill_rule_)
 
E & fill_rule (fill_rule_e &&_fill_rule_)
 
void apply_stroke (pixelmap_editor_t &editor) const
 
void set_source_to_stroke (pixelmap_editor_t &editor) const
 
color::Color sample_stroke (int x, int y) const
 
void apply_fill (pixelmap_editor_t &editor) const
 
void set_source_to_fill (pixelmap_editor_t &editor) const
 
color::Color sample_fill (int x, int y) const
 
void apply_font (pixelmap_editor_t &editor) const
 

Variables

color::Color c = "#00000000"_color
 
std::vector< Cairo::ColorStop > color_stops {}
 
int x0
 
int y0
 
int x1
 
int y1
 
int r0
 
int r1
 
paint_type_e paint_type = SOLID
 
std::unique_ptr< base_ipaint_data = std::make_unique<solid>()
 
std::string _id = " "
 
std::vector< std::string > _style_class = std::vector<std::string>{}
 
int _x = 0
 
int _y = 0
 
int _r = 0
 
int _rx = 0
 
int _ry = 0
 
int _x1 = 0
 
int _y1 = 0
 
int _x2 = 0
 
int _y2 = 0
 
int _cx = 0
 
int _cy = 0
 
double _rotate = 0
 
int _pivot_x = 0
 
int _pivot_y = 0
 
double _a1 = 0
 
double _a2 = 0
 
double _scale_x = 1
 
double _scale_y = 1
 
point_list_t _points = point_list_t{}
 
std::string _path_str = std::string{}
 
int _w = 0
 
int _h = 0
 
bool _hidden = 1.0
 
float _opacity = 1.0
 
vg::paint::type _stroke {vg::paint::type::SOLID, std::make_unique<vg::paint::solid>()}
 
std::valarray< double > _stroke_dasharray = std::valarray<double>{}
 
double _stroke_dashoffset = 0.0
 
stroke_linecap_e _stroke_linecap = stroke_linecap_e::BUTT
 
stroke_linejoin_e _stroke_linejoin = stroke_linejoin_e::MITER
 
int _stroke_miterlimit = 4
 
float _stroke_opacity = 1.0
 
int _stroke_width = 0
 
std::string _font_family = "default"
 
int _font_size = 12
 
double _font_stretch = 1.0
 
font_style_e _font_style = font_style_e::NORMAL
 
font_weight_e _font_weight = font_weight_e::NORMAL
 
text_anchor_e _text_anchor = text_anchor_e::START
 
bool underline = false
 
bool overline = false
 
bool strike_through = false
 
text_decoration_t _text_decoration = text_decoration_t{}
 
vg::paint::type _fill {vg::paint::type::SOLID, std::make_unique<vg::paint::solid>()}
 
double _fill_opacity = 1.0
 
fill_rule_e _fill_rule = fill_rule_e::WINDING
 

Files

file  include/cyd_ui/graphics/vector/attributes.cppm