efl::gfx::shape Struct Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Static Public Member Functions
efl::gfx::shape Struct Reference

Class shape. More...

## Public Member Functions
| shape (Eo *eo)
| Eo Constructor. More...
| shape (std::nullptr_t)
| nullptr_t Constructor. More...
| shape (shape const &other)
| Copy Constructor.
void | dup (::efl::eo::concrete dup_from_) const
| Copy the shape data from the object specified . More...
void | bounds_get (Eina_Rectangle *r_) const
| Compute and return the bounding box of the currently set path. More...
void | reset () const
| Reset the shape data of the shape object. More...
void | append_move_to (double x_, double y_) const
| Moves the current point to the given point, implicitly starting a new subpath and closing the previous one. More...
void | append_line_to (double x_, double y_) const
| Adds a straight line from the current position to the given endPoint. More...
void | append_quadratic_to (double x_, double y_, double ctrl_x_, double ctrl_y_) const
| Adds a quadratic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x, ctrl_y). More...
void | append_squadratic_to (double x_, double y_) const
| Same as efl_gfx_path_append_quadratic_to() api only difference is that it uses the current control point to draw the bezier. More...
void | append_cubic_to (double x_, double y_, double ctrl_x0_, double ctrl_y0_, double ctrl_x1_, double ctrl_y1_) const
| Adds a cubic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1). More...
void | append_scubic_to (double x_, double y_, double ctrl_x_, double ctrl_y_) const
| Same as efl_gfx_path_append_cubic_to() api only difference is that it uses the current control point to draw the bezier. More...
void | append_arc_to (double x_, double y_, double rx_, double ry_, double angle_, bool large_arc_, bool sweep_) const
| Append an arc that connects from the current point int the point list to the given point (x,y). More...
void | append_close () const
| Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. More...
void | append_circle (double x_, double y_, double radius_) const
| Append a circle with given center and radius. More...
void | append_rect (double x_, double y_, double w_, double h_, double rx_, double ry_) const
| Append the given rectangle with rounded corner to the path. More...
void | append_svg_path (::efl::eina::string_view svg_path_data_) const
bool | interpolate (const Eo *from_, const Eo *to_, double pos_map_) const
bool | equal_commands (const Eo *with_) const
double | stroke_scale_get () const
| Get the stroke scaling factor used for stroking this path. More...
void | stroke_scale_set (double s_) const
| Sets the stroke scale to be used for stroking the path. More...
void | stroke_color_get (int *r_, int *g_, int *b_, int *a_) const
| Gets the color used for stroking the path. More...
void | stroke_color_set (int r_, int g_, int b_, int a_) const
| Sets the color to be used for stroking the path. More...
double | stroke_width_get () const
| Gets the stroke width to be used for stroking the path. More...
void | stroke_width_set (double w_) const
| Sets the stroke width to be used for stroking the path. More...
double | stroke_location_get () const
| Not Implemented. More...
void | stroke_location_set (double centered_) const
| Not Implemented. More...
void | stroke_dash_get (const Efl_Gfx_Dash **dash_, unsigned int *length_) const
| Not Implemented. More...
void | stroke_dash_set (const Efl_Gfx_Dash *dash_, unsigned int length_) const
| Not Implemented. More...
Efl_Gfx_Cap | stroke_cap_get () const
| Gets the cap style used for stroking path. More...
void | stroke_cap_set (Efl_Gfx_Cap c_) const
| Sets the cap style to be used for stroking the path. More...
Efl_Gfx_Join | stroke_join_get () const
| Gets the join style used for stroking path. More...
void | stroke_join_set (Efl_Gfx_Join j_) const
| Sets the join style to be used for stroking the path. More...
void | path_get (const Efl_Gfx_Path_Command **op_, const double **points_) const
| Gets the command and points list. More...
void | path_set (const Efl_Gfx_Path_Command *op_, const double *points_) const
| Set the list of commands and points to be used to create the content of shape. More...
void | path_length_get (unsigned int *commands_, unsigned int *points_) const
void | current_get (double *x_, double *y_) const
void | current_ctrl_get (double *x_, double *y_) const
| shape (::efl::eo::parent_type _p)
| Constructs a new efl::gfx::shape object. More...
Public Member Functions inherited from efl::eo::concrete
| concrete (Eo *eo)
| Class constructor. More...
| concrete ()
| Default constructor. More...
| ~concrete ()
| Class destructor.
| concrete (concrete const &other)
| concrete (concrete &&other)
concrete & | operator= (concrete const &other)
| Assignment operator.
concrete & | operator= (concrete &&other)
Eo * | _eo_ptr () const
| Return a pointer to the EO Object stored in this instance. More...
Eo * | _release ()
| Releases the reference from this concrete object and return the pointer to the EO Object stored in this instance. More...
void | _reset (Eo *_ptr=nullptr)
| Reset the current pointer to reference a new Eo object.
int | ref_get () const
| Get the reference count of this object. More...
void | parent_set (concrete parent)
| Set the parent of this object. More...
eina::optional< concrete > | parent_get ()
| Get the parent of this object. More...
Eo_Dbg_Info | dbg_info_get ()
| Get debug information of this object. More...
| operator bool () const

## Static Public Member Functions
static Eo_Class const * | _eo_class ()

## Additional Inherited Members
Protected Attributes inherited from efl::eo::concrete
Eo * | _eo_raw
| The opaque EO Object.

## Detailed Description

Class shape.

## Constructor & Destructor Documentation

efl::gfx::shape::shape | ( | ::efl::eo::parent_type | _p | ) |
| inlineexplicit

Constructs a new efl::gfx::shape object.

Constructs a new efl::gfx::shape object. If you want this object to be a child of another Eo object, use an efl::eo::parent expression, like the example.

Example:

efl::gfx::shape my_shape(efl::eo::parent = parent_object);

See also
  shape(Eo* eo)

efl::gfx::shape::shape | ( | Eo * | eo | ) |
| inlineexplicit

Eo Constructor.

Constructs the object from an Eo* pointer stealing its ownership.

Parameters

  eo | The Eo object pointer.

efl::gfx::shape::shape | ( | std::nullptr_t |  | ) |
| inlineexplicit

nullptr_t Constructor.

Constructs an empty (null) object.

## Member Function Documentation

void efl::gfx::shape::dup | ( | ::efl::eo::concrete | dup_from_ | ) | const

Copy the shape data from the object specified .

Since
  1.14

Parameters

  dup_from | Shape object from where data will be copied.

void efl::gfx::shape::bounds_get | ( | Eina_Rectangle * | r_ | ) | const

Compute and return the bounding box of the currently set path.

Since
  1.14

Parameters

  [out] | r | Contain the bounding box of the currently set path

void efl::gfx::shape::reset | ( |  | ) | const

Reset the shape data of the shape object.

Since
  1.14

void efl::gfx::shape::append_move_to | ( | double | x_,
|  | double | y_
| ) |  | const

Moves the current point to the given point, implicitly starting a new subpath and closing the previous one.

See also
  efl_gfx_path_append_close()

Since
  1.14

Parameters

  x | X co-ordinate of the current point.
  y | Y co-ordinate of the current point.

void efl::gfx::shape::append_line_to | ( | double | x_,
|  | double | y_
| ) |  | const

Adds a straight line from the current position to the given endPoint.

After the line is drawn, the current position is updated to be at the end point of the line.

Note
  if no current position present, it draws a line to itself, basically a point.

See also
  efl_gfx_path_append_move_to()

Since
  1.14

Parameters

  x | X co-ordinate of end point of the line.
  y | Y co-ordinate of end point of the line.

void efl::gfx::shape::append_quadratic_to | ( | double | x_,
|  | double | y_,
|  | double | ctrl_x_,
|  | double | ctrl_y_
| ) |  | const

Adds a quadratic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x, ctrl_y).

After the path is drawn, the current position is updated to be at the end point of the path.

Since
  1.14

Parameters

  x | X co-ordinate of end point of the line.
  y | Y co-ordinate of end point of the line.
  ctrl_x | X co-ordinate of control point.
  ctrl_y | Y co-ordinate of control point.

void efl::gfx::shape::append_squadratic_to | ( | double | x_,
|  | double | y_
| ) |  | const

Same as efl_gfx_path_append_quadratic_to() api only difference is that it uses the current control point to draw the bezier.

See also
  efl_gfx_path_append_quadratic_to()

Since
  1.14

Parameters

  x | X co-ordinate of end point of the line.
  y | Y co-ordinate of end point of the line.

void efl::gfx::shape::append_cubic_to | ( | double | x_,
|  | double | y_,
|  | double | ctrl_x0_,
|  | double | ctrl_y0_,
|  | double | ctrl_x1_,
|  | double | ctrl_y1_
| ) |  | const

Adds a cubic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1).

After the path is drawn, the current position is updated to be at the end point of the path.

Since
  1.14

Parameters

  x | X co-ordinate of end point of the line.
  y | Y co-ordinate of end point of the line.
  ctrl_x0 | X co-ordinate of 1st control point.
  ctrl_y0 | Y co-ordinate of 1st control point.
  ctrl_x1 | X co-ordinate of 2nd control point.
  ctrl_y1 | Y co-ordinate of 2nd control point.

void efl::gfx::shape::append_scubic_to | ( | double | x_,
|  | double | y_,
|  | double | ctrl_x_,
|  | double | ctrl_y_
| ) |  | const

Same as efl_gfx_path_append_cubic_to() api only difference is that it uses the current control point to draw the bezier.

See also
  efl_gfx_path_append_cubic_to()

Since
  1.14

Parameters

  x | X co-ordinate of end point of the line.
  y | Y co-ordinate of end point of the line.
  ctrl_x | X co-ordinate of 2nd control point.
  ctrl_y | Y co-ordinate of 2nd control point.

void efl::gfx::shape::append_arc_to | ( | double | x_,
|  | double | y_,
|  | double | rx_,
|  | double | ry_,
|  | double | angle_,
|  | bool | large_arc_,
|  | bool | sweep_
| ) |  | const

Append an arc that connects from the current point int the point list to the given point (x,y).

The arc is defined by the given radius in x-direction (rx) and radius in y direction (ry) .

Note
  Use this api if you know the end point's of the arc otherwise use more convenient function efl_gfx_path_append_arc_to()

See also
  efl_gfx_path_append_arc_to()

Since
  1.14

Parameters

  x | X co-ordinate of end point of the arc.
  y | Y co-ordinate of end point of the arc.
  rx | radius of arc in x direction.
  ry | radius of arc in y direction.
  angle | x-axis rotation , normally 0.
  large_arc | Defines whether to draw the larger arc or smaller arc joining two point.
  sweep | Defines whether the arc will be drawn counter-clockwise or clockwise from current point to the end point taking into account the large_arc property.

void efl::gfx::shape::append_close | ( |  | ) | const

Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path.

The current point of the new path is (0, 0).

Note
  If the subpath does not contain any points, this function does nothing.

Since
  1.14

void efl::gfx::shape::append_circle | ( | double | x_,
|  | double | y_,
|  | double | radius_
| ) |  | const

Append a circle with given center and radius.

Since
  1.14

Parameters

  x | X co-ordinate of the center of the circle.
  y | Y co-ordinate of the center of the circle.
  radius | radius of the circle.

void efl::gfx::shape::append_rect | ( | double | x_,
|  | double | y_,
|  | double | w_,
|  | double | h_,
|  | double | rx_,
|  | double | ry_
| ) |  | const

Append the given rectangle with rounded corner to the path.

The xr and yr arguments specify the radii of the ellipses defining the corners of the rounded rectangle.

Note
  xr and yr are specified in terms of width and height respectively.
  if xr and yr are 0, then it will draw a rectangle without rounded corner.

Since
  1.14

Parameters

  x | X co-ordinate of the rectangle.
  y | Y co-ordinate of the rectangle.
  w | Width of the rectangle.
  h | Height of the rectangle.
  rx | The x radius of the rounded corner and should be in range [ 0 to w/2 ]
  ry | The y radius of the rounded corner and should be in range [ 0 to h/2 ]

void efl::gfx::shape::append_svg_path | ( | ::efl::eina::string_view | svg_path_data_ | ) | const

Parameters

  svg_path_data |

bool efl::gfx::shape::interpolate | ( | const Eo * | from_,
|  | const Eo * | to_,
|  | double | pos_map_
| ) |  | const

Parameters

  from |
  to |
  pos_map |

bool efl::gfx::shape::equal_commands | ( | const Eo * | with_ | ) | const

Parameters

  with |

double efl::gfx::shape::stroke_scale_get | ( |  | ) | const

Get the stroke scaling factor used for stroking this path.

Since
  1.14

Parameters

  s | stroke scale value

void efl::gfx::shape::stroke_scale_set | ( | double | s_ | ) | const

Sets the stroke scale to be used for stroking the path.

the scale property will be used along with stroke width property.

Since
  1.14

Parameters

  s | stroke scale value

void efl::gfx::shape::stroke_color_get | ( | int * | r_,
|  | int * | g_,
|  | int * | b_,
|  | int * | a_
| ) |  | const

Gets the color used for stroking the path.

Since
  1.14

Parameters

  r | The red component of the given color.
  g | The green component of the given color.
  b | The blue component of the given color.
  a | The alpha component of the given color.

void efl::gfx::shape::stroke_color_set | ( | int | r_,
|  | int | g_,
|  | int | b_,
|  | int | a_
| ) |  | const

Sets the color to be used for stroking the path.

Since
  1.14

Parameters

  r | The red component of the given color.
  g | The green component of the given color.
  b | The blue component of the given color.
  a | The alpha component of the given color.

double efl::gfx::shape::stroke_width_get | ( |  | ) | const

Gets the stroke width to be used for stroking the path.

Since
  1.14

Parameters

  w | stroke width to be used

void efl::gfx::shape::stroke_width_set | ( | double | w_ | ) | const

Sets the stroke width to be used for stroking the path.

Since
  1.14

Parameters

  w | stroke width to be used

double efl::gfx::shape::stroke_location_get | ( |  | ) | const

Not Implemented.

Parameters

  centered |

void efl::gfx::shape::stroke_location_set | ( | double | centered_ | ) | const

Not Implemented.

Parameters

  centered |

void efl::gfx::shape::stroke_dash_get | ( | const Efl_Gfx_Dash ** | dash_,
|  | unsigned int * | length_
| ) |  | const

Not Implemented.

Parameters

  dash |
  length |

void efl::gfx::shape::stroke_dash_set | ( | const Efl_Gfx_Dash * | dash_,
|  | unsigned int | length_
| ) |  | const

Not Implemented.

Parameters

  dash |
  length |

Efl_Gfx_Cap efl::gfx::shape::stroke_cap_get | ( |  | ) | const

Gets the cap style used for stroking path.

Since
  1.14

Parameters

  c | cap style to use , default is EFL_GFX_CAP_BUTT

void efl::gfx::shape::stroke_cap_set | ( | Efl_Gfx_Cap | c_ | ) | const

Sets the cap style to be used for stroking the path.

The cap will be used for capping the end point of a open subpath.

See also
  Efl_Gfx_Cap

Since
  1.14

Parameters

  c | cap style to use , default is EFL_GFX_CAP_BUTT

Efl_Gfx_Join efl::gfx::shape::stroke_join_get | ( |  | ) | const

Gets the join style used for stroking path.

Since
  1.14

Parameters

  j | join style to use , default is EFL_GFX_JOIN_MITER

void efl::gfx::shape::stroke_join_set | ( | Efl_Gfx_Join | j_ | ) | const

Sets the join style to be used for stroking the path.

The join style will be used for joining the two line segment while stroking teh path.

See also
  Efl_Gfx_Join

Since
  1.14

Parameters

  j | join style to use , default is EFL_GFX_JOIN_MITER

void efl::gfx::shape::path_get | ( | const Efl_Gfx_Path_Command ** | op_,
|  | const double ** | points_
| ) |  | const

Gets the command and points list.

Since
  1.14

Parameters

  op | command list
  points | point list

void efl::gfx::shape::path_set | ( | const Efl_Gfx_Path_Command * | op_,
|  | const double * | points_
| ) |  | const

Set the list of commands and points to be used to create the content of shape.

Note
  see efl_gfx_path interface for how to create a command list.

See also
  Efl_Gfx_Path_Command

Since
  1.14

Parameters

  op | command list
  points | point list

void efl::gfx::shape::path_length_get | ( | unsigned int * | commands_,
|  | unsigned int * | points_
| ) |  | const

Parameters

  commands |
  points |

void efl::gfx::shape::current_get | ( | double * | x_,
|  | double * | y_
| ) |  | const

Parameters

  x |
  y |

void efl::gfx::shape::current_ctrl_get | ( | double * | x_,
|  | double * | y_
| ) |  | const

Parameters

  x |
  y |