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)
 
concreteoperator= (concrete const &other)
 Assignment operator.
 
concreteoperator= (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< concreteparent_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
eoThe 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_fromShape 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]rContain 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
xX co-ordinate of the current point.
yY 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
xX co-ordinate of end point of the line.
yY 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
xX co-ordinate of end point of the line.
yY co-ordinate of end point of the line.
ctrl_xX co-ordinate of control point.
ctrl_yY 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
xX co-ordinate of end point of the line.
yY 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
xX co-ordinate of end point of the line.
yY co-ordinate of end point of the line.
ctrl_x0X co-ordinate of 1st control point.
ctrl_y0Y co-ordinate of 1st control point.
ctrl_x1X co-ordinate of 2nd control point.
ctrl_y1Y 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
xX co-ordinate of end point of the line.
yY co-ordinate of end point of the line.
ctrl_xX co-ordinate of 2nd control point.
ctrl_yY 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
xX co-ordinate of end point of the arc.
yY co-ordinate of end point of the arc.
rxradius of arc in x direction.
ryradius of arc in y direction.
anglex-axis rotation , normally 0.
large_arcDefines whether to draw the larger arc or smaller arc joining two point.
sweepDefines 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
xX co-ordinate of the center of the circle.
yY co-ordinate of the center of the circle.
radiusradius 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
xX co-ordinate of the rectangle.
yY co-ordinate of the rectangle.
wWidth of the rectangle.
hHeight of the rectangle.
rxThe x radius of the rounded corner and should be in range [ 0 to w/2 ]
ryThe 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
sstroke 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
sstroke 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
rThe red component of the given color.
gThe green component of the given color.
bThe blue component of the given color.
aThe 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
rThe red component of the given color.
gThe green component of the given color.
bThe blue component of the given color.
aThe 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
wstroke 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
wstroke 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
ccap 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
ccap 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
jjoin 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
jjoin 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
opcommand list
pointspoint 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
opcommand list
pointspoint 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