parent
e0ce78e170
commit
b14a85fd6c
|
@ -271,7 +271,7 @@ typedef struct _Line
|
|||
double y2;
|
||||
}Line;
|
||||
|
||||
static void
|
||||
static void
|
||||
_line_value_set(Line *l, double x1, double y1, double x2, double y2)
|
||||
{
|
||||
l->x1 = x1;
|
||||
|
@ -281,7 +281,7 @@ _line_value_set(Line *l, double x1, double y1, double x2, double y2)
|
|||
}
|
||||
|
||||
// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm.
|
||||
// With alpha = 1, beta = 3/8, giving results with the largest error less
|
||||
// With alpha = 1, beta = 3/8, giving results with the largest error less
|
||||
// than 7% compared to the exact value.
|
||||
static double
|
||||
_line_length(Line *l)
|
||||
|
@ -339,7 +339,7 @@ _dasher_line_to(Dash_Stroker *dasher, double x, double y)
|
|||
_outline_line_to(dasher->outline, x, y);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
while (line_len > dasher->cur_dash_length)
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ _dasher_cubic_to(Dash_Stroker *dasher, double cx1 , double cy1, double cx2, doub
|
|||
_outline_cubic_to(dasher->outline, cx1, cy1, cx2, cy2, x, y);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
while (bez_len > dasher->cur_dash_length)
|
||||
{
|
||||
|
|
|
@ -163,6 +163,31 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
|||
#include "interfaces/efl_gfx_stack.eo.h"
|
||||
#include "interfaces/efl_gfx_fill.eo.h"
|
||||
#include "interfaces/efl_gfx_view.eo.h"
|
||||
|
||||
/**
|
||||
* @brief Set the list of commands and points to be used to create the content
|
||||
* of path.
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[in] op Command list
|
||||
* @param[in] points Point list
|
||||
*
|
||||
* @ingroup Efl_Gfx_Path
|
||||
*/
|
||||
EOAPI void efl_gfx_path_set(Eo *obj, const Efl_Gfx_Path_Command_Type *op, const double *points);
|
||||
|
||||
/**
|
||||
* @brief Set the list of commands and points to be used to create the content
|
||||
* of path.
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[out] op Command list
|
||||
* @param[out] points Point list
|
||||
*
|
||||
* @ingroup Efl_Gfx_Path
|
||||
*/
|
||||
EOAPI void efl_gfx_path_get(const Eo *obj, const Efl_Gfx_Path_Command_Type **op, const double **points);
|
||||
|
||||
#include "interfaces/efl_gfx_path.eo.h"
|
||||
#include "interfaces/efl_gfx_shape.eo.h"
|
||||
#include "interfaces/efl_gfx_gradient.eo.h"
|
||||
|
|
|
@ -1375,7 +1375,7 @@ _next_command(char *path, char *cmd, double *arr, int *count)
|
|||
path++;
|
||||
*count = _number_count(*cmd);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (*cmd == 'm')
|
||||
*cmd = 'l';
|
||||
|
@ -1542,4 +1542,12 @@ _efl_gfx_path_efl_object_destructor(Eo *obj, Efl_Gfx_Path_Data *pd)
|
|||
efl_destructor(efl_super(obj, EFL_GFX_PATH_MIXIN));
|
||||
}
|
||||
|
||||
|
||||
EOAPI EFL_VOID_FUNC_BODYV(efl_gfx_path_set, EFL_FUNC_CALL(op, points), const Efl_Gfx_Path_Command_Type *op, const double *points);
|
||||
EOAPI EFL_VOID_FUNC_BODYV_CONST(efl_gfx_path_get, EFL_FUNC_CALL(op, points), const Efl_Gfx_Path_Command_Type **op, const double **points);
|
||||
|
||||
#define EFL_GFX_PATH_EXTRA_OPS \
|
||||
EFL_OBJECT_OP_FUNC(efl_gfx_path_set, _efl_gfx_path_path_set), \
|
||||
EFL_OBJECT_OP_FUNC(efl_gfx_path_get, _efl_gfx_path_path_get),
|
||||
|
||||
#include "interfaces/efl_gfx_path.eo.c"
|
||||
|
|
|
@ -1,23 +1,9 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
mixin @beta Efl.Gfx.Path requires Efl.Object
|
||||
{
|
||||
[[EFL graphics path object interface]]
|
||||
methods {
|
||||
@property path {
|
||||
[[Set the list of commands and points to be used to create the
|
||||
content of path.
|
||||
]]
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
op: ptr(const(Efl.Gfx.Path_Command_Type)); [[Command list]]
|
||||
points: ptr(const(double)); [[Point list]]
|
||||
}
|
||||
}
|
||||
@property length {
|
||||
[[Path length property]]
|
||||
get {
|
||||
|
@ -65,7 +51,7 @@ mixin @beta Efl.Gfx.Path requires Efl.Object
|
|||
]]
|
||||
}
|
||||
append_move_to {
|
||||
[[Moves the current point to the given point,
|
||||
[[Moves the current point to the given point,
|
||||
implicitly starting a new subpath and closing the previous one.
|
||||
|
||||
See also @.append_close.
|
||||
|
@ -140,7 +126,7 @@ mixin @beta Efl.Gfx.Path requires Efl.Object
|
|||
}
|
||||
append_arc_to {
|
||||
[[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
|
||||
to the given point (x,y). The arc is defined by the given radius in
|
||||
x-direction (rx) and radius in y direction (ry).
|
||||
|
||||
Use this api if you know the end point's of the arc otherwise use
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
abstract @beta Efl.Canvas.Vg.Node extends Efl.Object
|
||||
implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Duplicate, Efl.Gfx.Path
|
||||
|
|
Loading…
Reference in New Issue