forked from enlightenment/efl
ector: fix coding style of freetype backend.
This commit is contained in:
parent
1d0ce5bc05
commit
0ec75ca05f
|
@ -12,36 +12,36 @@
|
|||
static void
|
||||
_update_radial_data(Ector_Renderer_Software_Gradient_Data *gdata)
|
||||
{
|
||||
update_color_table(gdata);
|
||||
update_color_table(gdata);
|
||||
|
||||
gdata->radial.cx = gdata->grd->radial.x;
|
||||
gdata->radial.cy = gdata->grd->radial.y;
|
||||
gdata->radial.cradius = gdata->grd->radius;
|
||||
gdata->radial.cx = gdata->grd->radial.x;
|
||||
gdata->radial.cy = gdata->grd->radial.y;
|
||||
gdata->radial.cradius = gdata->grd->radius;
|
||||
|
||||
if (!gdata->grd->focal.x)
|
||||
gdata->radial.fx = gdata->grd->radial.x;
|
||||
else
|
||||
gdata->radial.fx = gdata->grd->focal.x;
|
||||
if (!gdata->grd->focal.x)
|
||||
gdata->radial.fx = gdata->grd->radial.x;
|
||||
else
|
||||
gdata->radial.fx = gdata->grd->focal.x;
|
||||
|
||||
if (!gdata->grd->focal.y)
|
||||
gdata->radial.fy = gdata->grd->radial.y;
|
||||
else
|
||||
gdata->radial.fy = gdata->grd->focal.y;
|
||||
if (!gdata->grd->focal.y)
|
||||
gdata->radial.fy = gdata->grd->radial.y;
|
||||
else
|
||||
gdata->radial.fy = gdata->grd->focal.y;
|
||||
|
||||
gdata->radial.fradius = 0;
|
||||
gdata->radial.fradius = 0;
|
||||
|
||||
gdata->radial.dx = gdata->radial.cx - gdata->radial.fx;
|
||||
gdata->radial.dy = gdata->radial.cy - gdata->radial.fy;
|
||||
gdata->radial.dx = gdata->radial.cx - gdata->radial.fx;
|
||||
gdata->radial.dy = gdata->radial.cy - gdata->radial.fy;
|
||||
|
||||
gdata->radial.dr = gdata->radial.cradius - gdata->radial.fradius;
|
||||
gdata->radial.sqrfr = gdata->radial.fradius * gdata->radial.fradius;
|
||||
gdata->radial.dr = gdata->radial.cradius - gdata->radial.fradius;
|
||||
gdata->radial.sqrfr = gdata->radial.fradius * gdata->radial.fradius;
|
||||
|
||||
gdata->radial.a = gdata->radial.dr * gdata->radial.dr -
|
||||
gdata->radial.dx * gdata->radial.dx -
|
||||
gdata->radial.dy * gdata->radial.dy;
|
||||
gdata->radial.inv2a = 1 / (2 * gdata->radial.a);
|
||||
gdata->radial.a = gdata->radial.dr * gdata->radial.dr -
|
||||
gdata->radial.dx * gdata->radial.dx -
|
||||
gdata->radial.dy * gdata->radial.dy;
|
||||
gdata->radial.inv2a = 1 / (2 * gdata->radial.a);
|
||||
|
||||
gdata->radial.extended = (gdata->radial.fradius >= 0.00001f) || gdata->radial.a >= 0.00001f;
|
||||
gdata->radial.extended = (gdata->radial.fradius >= 0.00001f) || gdata->radial.a >= 0.00001f;
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,9 +64,9 @@ _ector_renderer_software_gradient_radial_ector_renderer_generic_base_prepare(Eo
|
|||
// Clearly duplicated and should be in a common place...
|
||||
static Eina_Bool
|
||||
_ector_renderer_software_gradient_radial_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
|
||||
Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED,
|
||||
Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED,
|
||||
unsigned int mul_col EINA_UNUSED)
|
||||
Ector_Renderer_Software_Gradient_Data *pd EINA_UNUSED,
|
||||
Ector_Rop op EINA_UNUSED, Eina_Array *clips EINA_UNUSED,
|
||||
unsigned int mul_col EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ _ector_renderer_software_gradient_radial_ector_renderer_generic_base_draw(Eo *ob
|
|||
static Eina_Bool
|
||||
_ector_renderer_software_gradient_radial_ector_renderer_software_base_fill(Eo *obj EINA_UNUSED, Ector_Renderer_Software_Gradient_Data *pd)
|
||||
{
|
||||
ector_software_rasterizer_radial_gradient_set(pd->surface->software, pd);
|
||||
ector_software_rasterizer_radial_gradient_set(pd->surface->software, pd);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ static void _outline_transform(Outline *outline, Eina_Matrix3 *m)
|
|||
if (m)
|
||||
{
|
||||
double x, y;
|
||||
for (i = 0; i < ft_outline->n_points ; i++)
|
||||
for (i = 0; i < ft_outline->n_points; i++)
|
||||
{
|
||||
eina_matrix3_point_transform(m, ft_outline->points[i].x, ft_outline->points[i].y, &x, &y);
|
||||
ft_outline->points[i].x = (int)(x * 64);// to freetype 26.6 coordinate.
|
||||
|
@ -185,7 +185,7 @@ static void _outline_transform(Outline *outline, Eina_Matrix3 *m)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < ft_outline->n_points ; i++)
|
||||
for (i = 0; i < ft_outline->n_points; i++)
|
||||
{
|
||||
ft_outline->points[i].x = ft_outline->points[i].x <<6;// to freetype 26.6 coordinate.
|
||||
ft_outline->points[i].y = ft_outline->points[i].y <<6;
|
||||
|
@ -338,8 +338,8 @@ static void
|
|||
_ector_renderer_software_shape_efl_gfx_shape_path_set(Eo *obj, Ector_Renderer_Software_Shape_Data *pd,
|
||||
const Efl_Gfx_Path_Command *op, const double *points)
|
||||
{
|
||||
if(pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if(pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
pd->shape_data = NULL;
|
||||
pd->outline_data = NULL;
|
||||
|
||||
|
@ -353,8 +353,8 @@ _ector_renderer_software_shape_path_changed(void *data, Eo *obj EINA_UNUSED, con
|
|||
{
|
||||
Ector_Renderer_Software_Shape_Data *pd = data;
|
||||
|
||||
if(pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if(pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
|
||||
pd->shape_data = NULL;
|
||||
pd->outline_data = NULL;
|
||||
|
@ -377,8 +377,8 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
|
|||
{
|
||||
Eo *parent;
|
||||
|
||||
if(pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if(pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
|
||||
eo_do(obj, parent = eo_parent_get());
|
||||
eo_data_xunref(parent, pd->surface, obj);
|
||||
|
|
|
@ -53,14 +53,14 @@ static uint
|
|||
_gradient_pixel_fixed(const Ector_Renderer_Software_Gradient_Data *data, int fixed_pos)
|
||||
{
|
||||
int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS;
|
||||
return data->colorTable[_gradient_clamp(data, ipos)];
|
||||
return data->color_table[_gradient_clamp(data, ipos)];
|
||||
}
|
||||
|
||||
static inline uint
|
||||
_gradient_pixel(const Ector_Renderer_Software_Gradient_Data *data, float pos)
|
||||
{
|
||||
int ipos = (int)(pos * (GRADIENT_STOPTABLE_SIZE - 1) + (float)(0.5));
|
||||
return data->colorTable[_gradient_clamp(data, ipos)];
|
||||
return data->color_table[_gradient_clamp(data, ipos)];
|
||||
}
|
||||
|
||||
typedef double (*BLEND_FUNC)(double progress);
|
||||
|
@ -72,7 +72,7 @@ _ease_linear(double t)
|
|||
}
|
||||
|
||||
static void
|
||||
_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint *colorTable, int size)
|
||||
_generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint *color_table, int size)
|
||||
{
|
||||
int pos = 0;
|
||||
Efl_Gfx_Gradient_Stop *curr, *next;
|
||||
|
@ -83,11 +83,11 @@ _generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_c
|
|||
double incr = 1.0 / (double)size;
|
||||
double fpos = 1.5 * incr;
|
||||
|
||||
colorTable[pos++] = current_color;
|
||||
color_table[pos++] = current_color;
|
||||
|
||||
while (fpos <= curr->offset)
|
||||
{
|
||||
colorTable[pos] = colorTable[pos - 1];
|
||||
color_table[pos] = color_table[pos - 1];
|
||||
pos++;
|
||||
fpos += incr;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ _generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_c
|
|||
double t = func((fpos - curr->offset) * delta);
|
||||
int dist = (int)(256 * t);
|
||||
int idist = 256 - dist;
|
||||
colorTable[pos] = INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist);
|
||||
color_table[pos] = INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist);
|
||||
++pos;
|
||||
fpos += incr;
|
||||
}
|
||||
|
@ -112,29 +112,29 @@ _generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_c
|
|||
}
|
||||
|
||||
for (;pos < size; ++pos)
|
||||
colorTable[pos] = current_color;
|
||||
color_table[pos] = current_color;
|
||||
|
||||
// Make sure the last color stop is represented at the end of the table
|
||||
colorTable[size-1] = current_color;
|
||||
color_table[size-1] = current_color;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
update_color_table(Ector_Renderer_Software_Gradient_Data *gdata)
|
||||
{
|
||||
if(gdata->colorTable) return;
|
||||
if(gdata->color_table) return;
|
||||
|
||||
gdata->colorTable = malloc(GRADIENT_STOPTABLE_SIZE * 4);
|
||||
_generate_gradient_color_table(gdata->gd->colors, gdata->gd->colors_count, gdata->colorTable, GRADIENT_STOPTABLE_SIZE);
|
||||
gdata->color_table = malloc(GRADIENT_STOPTABLE_SIZE * 4);
|
||||
_generate_gradient_color_table(gdata->gd->colors, gdata->gd->colors_count, gdata->color_table, GRADIENT_STOPTABLE_SIZE);
|
||||
}
|
||||
|
||||
void
|
||||
destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata)
|
||||
{
|
||||
if (gdata->colorTable)
|
||||
if (gdata->color_table)
|
||||
{
|
||||
free(gdata->colorTable);
|
||||
gdata->colorTable = NULL;
|
||||
free(gdata->color_table);
|
||||
gdata->color_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef struct _Ector_Renderer_Software_Gradient_Data
|
|||
Software_Gradient_Linear_Data linear;
|
||||
Software_Gradient_Radial_Data radial;
|
||||
};
|
||||
uint* colorTable;
|
||||
uint* color_table;
|
||||
} Ector_Renderer_Software_Gradient_Data;
|
||||
|
||||
|
||||
|
@ -66,8 +66,8 @@ typedef struct _Clip_Data
|
|||
Eina_Array *clips; //Eina_Rectangle
|
||||
Shape_Rle_Data *path;
|
||||
unsigned int enabled : 1;
|
||||
unsigned int hasRectClip : 1;
|
||||
unsigned int hasPathClip : 1;
|
||||
unsigned int has_rect_clip : 1;
|
||||
unsigned int has_path_clip : 1;
|
||||
} Clip_Data;
|
||||
|
||||
|
||||
|
@ -105,9 +105,9 @@ typedef struct _Software_Rasterizer
|
|||
SW_FT_Raster raster;
|
||||
SW_FT_Stroker stroker;
|
||||
|
||||
Span_Data fillData;
|
||||
Span_Data fill_data;
|
||||
Eina_Matrix3 *transform;
|
||||
Eina_Rectangle systemClip;
|
||||
Eina_Rectangle system_clip;
|
||||
|
||||
} Software_Rasterizer;
|
||||
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
#include "ector_blend_private.h"
|
||||
|
||||
static void
|
||||
_blend_color_argb(int count, const SW_FT_Span *spans, void *userData)
|
||||
_blend_color_argb(int count, const SW_FT_Span *spans, void *user_data)
|
||||
{
|
||||
Span_Data *data = (Span_Data *)(userData);
|
||||
Span_Data *data = (Span_Data *)(user_data);
|
||||
|
||||
// multiply the color with mul_col if any
|
||||
uint color = ECTOR_MUL4_SYM(data->color, data->mul_col);
|
||||
Eina_Bool solidSource = ((color >> 24) == 255);
|
||||
Eina_Bool solid_source = ((color >> 24) == 255);
|
||||
|
||||
// move to the offset location
|
||||
uint *buffer = data->raster_buffer.buffer + (data->raster_buffer.width * data->offy + data->offx);
|
||||
|
||||
if (solidSource)
|
||||
if (solid_source)
|
||||
{
|
||||
while (count--)
|
||||
{
|
||||
|
@ -60,9 +60,9 @@ int buffer_size = 2048;
|
|||
typedef void (*src_fetch) (unsigned int *buffer, Span_Data *data, int y, int x, int length);
|
||||
|
||||
static void
|
||||
_blend_gradient(int count, const SW_FT_Span *spans, void *userData)
|
||||
_blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
|
||||
{
|
||||
Span_Data *data = (Span_Data *)(userData);
|
||||
Span_Data *data = (Span_Data *)(user_data);
|
||||
src_fetch fetchfunc = NULL;
|
||||
|
||||
if(data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
|
||||
|
@ -99,9 +99,9 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *userData)
|
|||
*/
|
||||
static const
|
||||
SW_FT_Span *_intersect_spans_rect(const Eina_Rectangle *clip, const SW_FT_Span *spans, const SW_FT_Span *end,
|
||||
SW_FT_Span **outSpans, int available)
|
||||
SW_FT_Span **out_spans, int available)
|
||||
{
|
||||
SW_FT_Span *out = *outSpans;
|
||||
SW_FT_Span *out = *out_spans;
|
||||
const short minx = clip->x;
|
||||
const short miny = clip->y;
|
||||
const short maxx = minx + clip->w - 1;
|
||||
|
@ -142,7 +142,7 @@ SW_FT_Span *_intersect_spans_rect(const Eina_Rectangle *clip, const SW_FT_Span *
|
|||
--available;
|
||||
}
|
||||
|
||||
*outSpans = out;
|
||||
*out_spans = out;
|
||||
|
||||
return spans;
|
||||
}
|
||||
|
@ -153,9 +153,9 @@ _div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
|
|||
static const
|
||||
SW_FT_Span *_intersect_spans_region(const Shape_Rle_Data *clip, int *currentClip,
|
||||
const SW_FT_Span *spans, const SW_FT_Span *end,
|
||||
SW_FT_Span **outSpans, int available)
|
||||
SW_FT_Span **out_spans, int available)
|
||||
{
|
||||
SW_FT_Span *out = *outSpans;
|
||||
SW_FT_Span *out = *out_spans;
|
||||
|
||||
const SW_FT_Span *clipSpans = clip->spans + *currentClip;
|
||||
const SW_FT_Span *clipEnd = clip->spans + clip->size;
|
||||
|
@ -204,19 +204,19 @@ SW_FT_Span *_intersect_spans_region(const Shape_Rle_Data *clip, int *currentClip
|
|||
}
|
||||
}
|
||||
|
||||
*outSpans = out;
|
||||
*out_spans = out;
|
||||
*currentClip = clipSpans - clip->spans;
|
||||
return spans;
|
||||
}
|
||||
|
||||
static void
|
||||
_span_fill_clipRect(int spanCount, const SW_FT_Span *spans, void *userData)
|
||||
_span_fill_clipRect(int span_count, const SW_FT_Span *spans, void *user_data)
|
||||
{
|
||||
const int NSPANS = 256;
|
||||
int clip_count, i;
|
||||
SW_FT_Span cspans[NSPANS];
|
||||
Span_Data *fillData = (Span_Data *) userData;
|
||||
Clip_Data clip = fillData->clip;
|
||||
Span_Data *fill_data = (Span_Data *) user_data;
|
||||
Clip_Data clip = fill_data->clip;
|
||||
|
||||
clip_count = eina_array_count(clip.clips);
|
||||
for (i = 0; i < clip_count ; i ++)
|
||||
|
@ -225,40 +225,40 @@ _span_fill_clipRect(int spanCount, const SW_FT_Span *spans, void *userData)
|
|||
Eina_Rectangle tmpRect;
|
||||
|
||||
// invert transform the offset
|
||||
tmpRect.x = rect->x - fillData->offx;
|
||||
tmpRect.y = rect->y - fillData->offy;
|
||||
tmpRect.x = rect->x - fill_data->offx;
|
||||
tmpRect.y = rect->y - fill_data->offy;
|
||||
tmpRect.w = rect->w;
|
||||
tmpRect.h = rect->h;
|
||||
const SW_FT_Span *end = spans + spanCount;
|
||||
const SW_FT_Span *end = spans + span_count;
|
||||
|
||||
while (spans < end)
|
||||
{
|
||||
SW_FT_Span *clipped = cspans;
|
||||
spans = _intersect_spans_rect(&tmpRect,spans, end, &clipped, NSPANS);
|
||||
if (clipped - cspans)
|
||||
fillData->unclipped_blend(clipped - cspans, cspans, fillData);
|
||||
fill_data->unclipped_blend(clipped - cspans, cspans, fill_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_span_fill_clipPath(int spanCount, const SW_FT_Span *spans, void *userData)
|
||||
_span_fill_clipPath(int span_count, const SW_FT_Span *spans, void *user_data)
|
||||
{
|
||||
const int NSPANS = 256;
|
||||
int current_clip = 0;
|
||||
SW_FT_Span cspans[NSPANS];
|
||||
Span_Data *fillData = (Span_Data *) userData;
|
||||
Clip_Data clip = fillData->clip;
|
||||
Span_Data *fill_data = (Span_Data *) user_data;
|
||||
Clip_Data clip = fill_data->clip;
|
||||
|
||||
//TODO take clip path offset into account.
|
||||
|
||||
const SW_FT_Span *end = spans + spanCount;
|
||||
const SW_FT_Span *end = spans + span_count;
|
||||
while (spans < end)
|
||||
{
|
||||
SW_FT_Span *clipped = cspans;
|
||||
spans = _intersect_spans_region(clip.path, ¤t_clip, spans, end, &clipped, NSPANS);
|
||||
if (clipped - cspans)
|
||||
fillData->unclipped_blend(clipped - cspans, cspans, fillData);
|
||||
fill_data->unclipped_blend(clipped - cspans, cspans, fill_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ _adjust_span_fill_methods(Span_Data *spdata)
|
|||
{
|
||||
spdata->blend = spdata->unclipped_blend;
|
||||
}
|
||||
else if (spdata->clip.hasRectClip)
|
||||
else if (spdata->clip.has_rect_clip)
|
||||
{
|
||||
spdata->blend = &_span_fill_clipRect;
|
||||
}
|
||||
|
@ -314,10 +314,10 @@ void ector_software_rasterizer_init(Software_Rasterizer *rasterizer)
|
|||
SW_FT_Stroker_Set(rasterizer->stroker, 1<<6,SW_FT_STROKER_LINECAP_BUTT,SW_FT_STROKER_LINEJOIN_MITER,0);
|
||||
|
||||
//initialize the span data.
|
||||
rasterizer->fillData.raster_buffer.buffer = NULL;
|
||||
rasterizer->fillData.clip.enabled = EINA_FALSE;
|
||||
rasterizer->fillData.unclipped_blend = 0;
|
||||
rasterizer->fillData.blend = 0;
|
||||
rasterizer->fill_data.raster_buffer.buffer = NULL;
|
||||
rasterizer->fill_data.clip.enabled = EINA_FALSE;
|
||||
rasterizer->fill_data.unclipped_blend = 0;
|
||||
rasterizer->fill_data.blend = 0;
|
||||
}
|
||||
|
||||
void ector_software_rasterizer_done(Software_Rasterizer *rasterizer)
|
||||
|
@ -443,12 +443,12 @@ void _setup_span_fill_matrix(Software_Rasterizer *rasterizer)
|
|||
{
|
||||
if (rasterizer->transform)
|
||||
{
|
||||
eina_matrix3_inverse(rasterizer->transform, &rasterizer->fillData.inv);
|
||||
eina_matrix3_inverse(rasterizer->transform, &rasterizer->fill_data.inv);
|
||||
}
|
||||
else
|
||||
{
|
||||
eina_matrix3_identity(&rasterizer->fillData.inv);
|
||||
eina_matrix3_identity(&rasterizer->fillData.inv);
|
||||
eina_matrix3_identity(&rasterizer->fill_data.inv);
|
||||
eina_matrix3_identity(&rasterizer->fill_data.inv);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -461,39 +461,39 @@ void ector_software_rasterizer_clip_rect_set(Software_Rasterizer *rasterizer, Ei
|
|||
{
|
||||
if (clips)
|
||||
{
|
||||
rasterizer->fillData.clip.clips = clips;
|
||||
rasterizer->fillData.clip.hasRectClip = EINA_TRUE;
|
||||
rasterizer->fillData.clip.enabled = EINA_TRUE;
|
||||
rasterizer->fill_data.clip.clips = clips;
|
||||
rasterizer->fill_data.clip.has_rect_clip = EINA_TRUE;
|
||||
rasterizer->fill_data.clip.enabled = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
rasterizer->fillData.clip.clips = NULL;
|
||||
rasterizer->fillData.clip.hasRectClip = EINA_FALSE;
|
||||
rasterizer->fillData.clip.enabled = EINA_FALSE;
|
||||
rasterizer->fill_data.clip.clips = NULL;
|
||||
rasterizer->fill_data.clip.has_rect_clip = EINA_FALSE;
|
||||
rasterizer->fill_data.clip.enabled = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void ector_software_rasterizer_clip_shape_set(Software_Rasterizer *rasterizer, Shape_Rle_Data *clip)
|
||||
{
|
||||
rasterizer->fillData.clip.path = clip;
|
||||
rasterizer->fillData.clip.hasPathClip = EINA_TRUE;
|
||||
rasterizer->fillData.clip.enabled = EINA_TRUE;
|
||||
rasterizer->fill_data.clip.path = clip;
|
||||
rasterizer->fill_data.clip.has_path_clip = EINA_TRUE;
|
||||
rasterizer->fill_data.clip.enabled = EINA_TRUE;
|
||||
}
|
||||
|
||||
void ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a)
|
||||
{
|
||||
rasterizer->fillData.color = ECTOR_ARGB_JOIN(a, r, g, b);
|
||||
rasterizer->fillData.type = Solid;
|
||||
rasterizer->fill_data.color = ECTOR_ARGB_JOIN(a, r, g, b);
|
||||
rasterizer->fill_data.type = Solid;
|
||||
}
|
||||
void ector_software_rasterizer_linear_gradient_set(Software_Rasterizer *rasterizer, Ector_Renderer_Software_Gradient_Data *linear)
|
||||
{
|
||||
rasterizer->fillData.gradient = linear;
|
||||
rasterizer->fillData.type = LinearGradient;
|
||||
rasterizer->fill_data.gradient = linear;
|
||||
rasterizer->fill_data.type = LinearGradient;
|
||||
}
|
||||
void ector_software_rasterizer_radial_gradient_set(Software_Rasterizer *rasterizer, Ector_Renderer_Software_Gradient_Data *radial)
|
||||
{
|
||||
rasterizer->fillData.gradient = radial;
|
||||
rasterizer->fillData.type = RadialGradient;
|
||||
rasterizer->fill_data.gradient = radial;
|
||||
rasterizer->fill_data.type = RadialGradient;
|
||||
}
|
||||
|
||||
|
||||
|
@ -503,14 +503,14 @@ void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer,
|
|||
// check for NULL rle data
|
||||
if (!rle) return;
|
||||
|
||||
rasterizer->fillData.offx = x;
|
||||
rasterizer->fillData.offy = y;
|
||||
rasterizer->fillData.mul_col = mul_col;
|
||||
rasterizer->fillData.op = op;
|
||||
rasterizer->fill_data.offx = x;
|
||||
rasterizer->fill_data.offy = y;
|
||||
rasterizer->fill_data.mul_col = mul_col;
|
||||
rasterizer->fill_data.op = op;
|
||||
|
||||
_setup_span_fill_matrix(rasterizer);
|
||||
_adjust_span_fill_methods(&rasterizer->fillData);
|
||||
_adjust_span_fill_methods(&rasterizer->fill_data);
|
||||
|
||||
if(rasterizer->fillData.blend)
|
||||
rasterizer->fillData.blend(rle->size, rle->spans, &rasterizer->fillData);
|
||||
if(rasterizer->fill_data.blend)
|
||||
rasterizer->fill_data.blend(rle->size, rle->spans, &rasterizer->fill_data);
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ _ector_software_surface_surface_set(Eo *obj EINA_UNUSED,
|
|||
Ector_Software_Surface_Data *pd,
|
||||
void *pixels, unsigned int width, unsigned int height)
|
||||
{
|
||||
pd->software->fillData.raster_buffer.buffer = pixels;
|
||||
pd->software->fillData.raster_buffer.width = width;
|
||||
pd->software->fillData.raster_buffer.height = height;
|
||||
pd->software->fill_data.raster_buffer.buffer = pixels;
|
||||
pd->software->fill_data.raster_buffer.width = width;
|
||||
pd->software->fill_data.raster_buffer.height = height;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -60,9 +60,9 @@ _ector_software_surface_surface_get(Eo *obj EINA_UNUSED,
|
|||
Ector_Software_Surface_Data *pd,
|
||||
void **pixels, unsigned int *width, unsigned int *height)
|
||||
{
|
||||
*pixels = pd->software->fillData.raster_buffer.buffer;
|
||||
*width = pd->software->fillData.raster_buffer.width;
|
||||
*height = pd->software->fillData.raster_buffer.height;
|
||||
*pixels = pd->software->fill_data.raster_buffer.buffer;
|
||||
*width = pd->software->fill_data.raster_buffer.width;
|
||||
*height = pd->software->fill_data.raster_buffer.height;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue