forked from enlightenment/efl
ector: update cairo enum definitions and fix gradient spread issue.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
c8764e9279
commit
85312d56c6
|
@ -30,6 +30,29 @@ struct _Ector_Renderer_Cairo_Base_Data
|
|||
cairo_matrix_t *m;
|
||||
};
|
||||
|
||||
typedef enum _cairo_extend {
|
||||
CAIRO_EXTEND_NONE,
|
||||
CAIRO_EXTEND_REPEAT,
|
||||
CAIRO_EXTEND_REFLECT,
|
||||
CAIRO_EXTEND_PAD
|
||||
} cairo_extend_t;
|
||||
|
||||
static inline cairo_extend_t
|
||||
_ector_cairo_extent_get(Efl_Gfx_Gradient_Spread s)
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case EFL_GFX_GRADIENT_SPREAD_PAD:
|
||||
return CAIRO_EXTEND_PAD;
|
||||
case EFL_GFX_GRADIENT_SPREAD_REFLECT:
|
||||
return CAIRO_EXTEND_REFLECT;
|
||||
case EFL_GFX_GRADIENT_SPREAD_REPEAT:
|
||||
return CAIRO_EXTEND_REPEAT;
|
||||
default:
|
||||
return CAIRO_EXTEND_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
#define CHECK_CAIRO(Parent) (!(Parent && Parent->cairo))
|
||||
|
||||
#define USE(Obj, Sym, Error) \
|
||||
|
|
|
@ -20,7 +20,6 @@ static void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, doubl
|
|||
double red, double green, double blue, double alpha) = NULL;
|
||||
static void (*cairo_pattern_destroy)(cairo_pattern_t *pattern) = NULL;
|
||||
|
||||
typedef enum _cairo_extend_t{cairo_extend}cairo_extend_t;
|
||||
static void (*cairo_pattern_set_extend)(cairo_pattern_t *pattern, cairo_extend_t extend) = NULL;
|
||||
|
||||
typedef struct _Ector_Renderer_Cairo_Gradient_Linear_Data Ector_Renderer_Cairo_Gradient_Linear_Data;
|
||||
|
@ -63,7 +62,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_prepare(Eo *ob
|
|||
}
|
||||
|
||||
USE(obj, cairo_pattern_set_extend, EINA_FALSE);
|
||||
cairo_pattern_set_extend(pd->pat, gd->s);
|
||||
cairo_pattern_set_extend(pd->pat, _ector_cairo_extent_get(gd->s));
|
||||
|
||||
if (!pd->parent)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@ static void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, doubl
|
|||
double red, double green, double blue, double alpha) = NULL;
|
||||
static void (*cairo_pattern_destroy)(cairo_pattern_t *pattern) = NULL;
|
||||
|
||||
typedef enum _cairo_extend_t{cairo_extend}cairo_extend_t;
|
||||
static void (*cairo_pattern_set_extend)(cairo_pattern_t *pattern, cairo_extend_t extend) = NULL;
|
||||
|
||||
// FIXME: as long as it is not possible to directly access the parent structure
|
||||
|
@ -68,7 +67,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *ob
|
|||
}
|
||||
|
||||
USE(obj, cairo_pattern_set_extend, EINA_FALSE);
|
||||
cairo_pattern_set_extend(pd->pat, gd->s);
|
||||
cairo_pattern_set_extend(pd->pat, _ector_cairo_extent_get(gd->s));
|
||||
|
||||
if (!pd->parent)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,18 @@
|
|||
|
||||
typedef struct _cairo_path_t cairo_path_t;
|
||||
|
||||
typedef enum _cairo_line_cap {
|
||||
CAIRO_LINE_CAP_BUTT,
|
||||
CAIRO_LINE_CAP_ROUND,
|
||||
CAIRO_LINE_CAP_SQUARE
|
||||
} cairo_line_cap_t;
|
||||
|
||||
typedef enum _cairo_line_join {
|
||||
CAIRO_LINE_JOIN_MITER,
|
||||
CAIRO_LINE_JOIN_ROUND,
|
||||
CAIRO_LINE_JOIN_BEVEL
|
||||
} cairo_line_join_t;
|
||||
|
||||
static void (*cairo_move_to)(cairo_t *cr, double x, double y) = NULL;
|
||||
static void (*cairo_line_to)(cairo_t *cr, double x, double y) = NULL;
|
||||
static void (*cairo_curve_to)(cairo_t *cr,
|
||||
|
@ -36,8 +48,6 @@ static void (*cairo_path_destroy)(cairo_path_t *path) = NULL;
|
|||
static void (*cairo_new_path)(cairo_t *cr) = NULL;
|
||||
static void (*cairo_append_path)(cairo_t *cr, const cairo_path_t *path) = NULL;
|
||||
|
||||
typedef enum _cairo_line_cap_t{lie_cap}cairo_line_cap_t;
|
||||
typedef enum _cairo_line_join_t{line_join}cairo_line_join_t;
|
||||
static void (*cairo_set_line_width)(cairo_t *cr, double width) = NULL;
|
||||
static void (*cairo_set_line_cap)(cairo_t *cr, cairo_line_cap_t line_cap) = NULL;
|
||||
static void (*cairo_set_line_join)(cairo_t *cr, cairo_line_join_t line_join) = NULL;
|
||||
|
|
Loading…
Reference in New Issue