#include "ector_private.h"
#include "ector_software_private.h"
+#define MY_CLASS ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS
+
typedef struct _Ector_Renderer_Software_Shape_Data Ector_Renderer_Software_Shape_Data;
typedef struct _Ector_Software_Shape_Task Ector_Software_Shape_Task;
pd->shape_data = NULL;
pd->outline_data = NULL;
- efl_gfx_path_set(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS), op, points);
+ efl_gfx_path_set(efl_super(obj, MY_CLASS), op, points);
}
static Eo *
_ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
{
- obj = efl_constructor(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
+ obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!obj) return NULL;
pd->task = NULL;
efl_data_xunref(obj, pd->shape, obj);
efl_data_xunref(obj, pd->public_shape, obj);
- efl_destructor(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
+ efl_destructor(efl_super(obj, MY_CLASS));
}
-
unsigned int
_ector_renderer_software_shape_ector_renderer_crc_get(const Eo *obj,
- Ector_Renderer_Software_Shape_Data *pd)
+ Ector_Renderer_Software_Shape_Data *pd)
{
unsigned int crc;
- crc = ector_renderer_crc_get(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
+ crc = ector_renderer_crc_get(efl_super(obj, MY_CLASS));
crc = eina_crc((void*) &pd->shape->stroke.marker,
sizeof (pd->shape->stroke.marker),
Eina_Rectangle *rect;
Eina_Rectangle tmp_rect;
-
clip_count = eina_array_count(clip.clips);
+
for (i = 0; i < clip_count; i++)
{
rect = (Eina_Rectangle *)eina_array_data_get(clip.clips, i);
break;
}
- // setup clipping
- if (!spdata->unclipped_blend)
- {
- spdata->blend = 0;
- }
- else if (!spdata->clip.enabled)
- {
- spdata->blend = spdata->unclipped_blend;
- }
- else if (spdata->clip.has_rect_clip)
+ // Clipping Function
+ if (spdata->clip.enabled)
{
- spdata->blend = &_span_fill_clipRect;
+ if (spdata->clip.type == 0)
+ spdata->blend = &_span_fill_clipRect;
+ else
+ spdata->blend = &_span_fill_clipPath;
}
else
- {
- spdata->blend = &_span_fill_clipPath;
- }
+ spdata->blend = spdata->unclipped_blend;
}
void ector_software_thread_init(Ector_Software_Thread *thread)
return rle_data;
}
-void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle)
+void
+ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle)
{
if (rle)
{
eina_matrix3_identity(&rasterizer->fill_data.inv);
}
-void ector_software_rasterizer_transform_set(Software_Rasterizer *rasterizer, Eina_Matrix3 *t)
+void
+ector_software_rasterizer_transform_set(Software_Rasterizer *rasterizer, Eina_Matrix3 *t)
{
rasterizer->transform = t;
}
-void ector_software_rasterizer_clip_rect_set(Software_Rasterizer *rasterizer, Eina_Array *clips)
+void
+ector_software_rasterizer_clip_rect_set(Software_Rasterizer *rasterizer, Eina_Array *clips)
{
if (clips)
{
rasterizer->fill_data.clip.clips = clips;
- rasterizer->fill_data.clip.has_rect_clip = EINA_TRUE;
+ rasterizer->fill_data.clip.type = 0;
rasterizer->fill_data.clip.enabled = EINA_TRUE;
}
else
{
rasterizer->fill_data.clip.clips = NULL;
- rasterizer->fill_data.clip.has_rect_clip = EINA_FALSE;
+ rasterizer->fill_data.clip.type = 0;
rasterizer->fill_data.clip.enabled = EINA_FALSE;
}
}
-void ector_software_rasterizer_clip_shape_set(Software_Rasterizer *rasterizer, Shape_Rle_Data *clip)
+void
+ector_software_rasterizer_clip_shape_set(Software_Rasterizer *rasterizer, Shape_Rle_Data *clip)
{
- rasterizer->fill_data.clip.path = clip;
- rasterizer->fill_data.clip.has_path_clip = EINA_TRUE;
- rasterizer->fill_data.clip.enabled = EINA_TRUE;
+ if (clip)
+ {
+ rasterizer->fill_data.clip.path = clip;
+ rasterizer->fill_data.clip.type = 1;
+ rasterizer->fill_data.clip.enabled = EINA_TRUE;
+ }
+ else
+ {
+ rasterizer->fill_data.clip.path = NULL;
+ rasterizer->fill_data.clip.type = 0;
+ rasterizer->fill_data.clip.enabled = EINA_FALSE;
+ }
}
-void ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a)
+void
+ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a)
{
rasterizer->fill_data.color = DRAW_ARGB_JOIN(a, r, g, b);
rasterizer->fill_data.type = Solid;
rasterizer->fill_data.type = LinearGradient;
}
-void ector_software_rasterizer_radial_gradient_set(Software_Rasterizer *rasterizer,
- Ector_Renderer_Software_Gradient_Data *radial)
+void
+ector_software_rasterizer_radial_gradient_set(Software_Rasterizer *rasterizer,
+ Ector_Renderer_Software_Gradient_Data *radial)
{
rasterizer->fill_data.gradient = radial;
rasterizer->fill_data.type = RadialGradient;