enesim  0.0.23.1
Drawinglibrary
Modules | Typedefs | Functions
Figures
Basic types

Figure definition. More...

Modules

 Figure definitions

Typedefs

typedef struct _Enesim_Figure Enesim_Figure

Functions

EAPI Enesim_Figureenesim_figure_new (void)
 Creates a new figure.
EAPI Enesim_Figureenesim_figure_ref (Enesim_Figure *thiz)
 Increase the reference counter of a figure.
EAPI void enesim_figure_unref (Enesim_Figure *thiz)
 Decrease the reference counter of a figure.
EAPI Eina_Bool enesim_figure_bounds (const Enesim_Figure *thiz, double *xmin, double *ymin, double *xmax, double *ymax)
EAPI void enesim_figure_clear (Enesim_Figure *thiz)
EAPI void enesim_figure_polygon_add (Enesim_Figure *thiz)
 Add a new polygon for the figure.
EAPI void enesim_figure_polygon_vertex_add (Enesim_Figure *thiz, double x, double y)
 Add a vertex on the current polygon created on a figure renderer.
EAPI void enesim_figure_polygon_close (Enesim_Figure *thiz)
 Close the last polygon of a figure renderer.
EAPI double enesim_figure_length_get (Enesim_Figure *thiz)
EAPI void enesim_figure_point_at (Enesim_Figure *thiz, double at, Enesim_Figure_Point_At_Cb cb, void *data)

Detailed Description

Figure definition.


Typedef Documentation

typedef struct _Enesim_Figure Enesim_Figure

Figure Handle


Function Documentation

EAPI Enesim_Figure* enesim_figure_new ( void  )

Creates a new figure.

Returns:
The newly created figure

Increase the reference counter of a figure.

Parameters:
[in]thizThe figure
Returns:
The input parameter thiz for programming convenience
EAPI void enesim_figure_unref ( Enesim_Figure thiz)

Decrease the reference counter of a figure.

Parameters:
[in]thizThe figure
EAPI Eina_Bool enesim_figure_bounds ( const Enesim_Figure thiz,
double *  xmin,
double *  ymin,
double *  xmax,
double *  ymax 
)

Calculate the bounds of a figure

Parameters:
[in]thizThe figure to calculate the bounds from
[out]xminThe minimum x coordinate
[out]yminThe minimum y coordinate
[out]xmaxThe maximum x coordinate
[out]ymaxThe maximum y coordinate
EAPI void enesim_figure_clear ( Enesim_Figure thiz)

Clear the list polygons of a figure

Parameters:
[in]thizThe figure to clear

Add a new polygon for the figure.

Parameters:
[in]rThe figure renderer

This function adds a new polygon to the current list of polygons. Note that in case there was a previous polygon, it will not be closed. For that call enesim_renderer_figure_polygon_close before

EAPI void enesim_figure_polygon_vertex_add ( Enesim_Figure thiz,
double  x,
double  y 
)

Add a vertex on the current polygon created on a figure renderer.

Parameters:
[in]rThe figure renderer
[in]xThe X coordinate of the vertex
[in]yThe Y coordinate of the vertex

Close the last polygon of a figure renderer.

Parameters:
[in]rThe figure renderer

This function closes the last polygon added with enesim_renderer_figure_polygon_add.

EAPI void enesim_figure_point_at ( Enesim_Figure thiz,
double  at,
Enesim_Figure_Point_At_Cb  cb,
void *  data 
)

Get the position and angle at a specified length of a figure

Parameters:
[in]thizThe figure the get the point attributes from
[in]atThe length to get the point attributes at. In the 0 to length range
[in]cbThe callback to call when the length is found
[in]dataThe user provided data to be passed to the callback
 All Data Structures Variables