return EINA_FALSE;
}
-E_API void
+E_API Eina_Bool
e_comp_image_filter_edge_detection_param_set(double thickness, unsigned int color_id)
{
E_Zone *zone;
if (thickness <= 0.0 || thickness >= 5.0)
{
ERR("Invalid edge detection thickness value: %f", thickness);
- return;
+ return EINA_FALSE;
}
if (color_id < 1 || color_id > 4)
{
ERR("Invalid edge detection color_id value: %u", color_id);
- return;
+ return EINA_FALSE;
}
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+
e_comp->edge_detection_thickness = thickness;
e_comp->edge_detection_color_id = color_id;
- if (e_comp->image_filter != E_COMP_IMAGE_FILTER_EDGE_DETECTION) return;
+ if (e_comp->image_filter != E_COMP_IMAGE_FILTER_EDGE_DETECTION) return EINA_FALSE;
EINA_LIST_FOREACH(e_comp->zones, l, zone)
E_ZONE_CLIENT_FOREACH(zone, ec)
{
e_view_client_dirty(view_client);
e_view_client_render(view_client);
}
+
+ return EINA_TRUE;
}
E_API E_Comp_Image_Filter
E_API Eina_Bool e_comp_image_filter_set(E_Comp_Image_Filter filter);
// 0.0 < thickness < 5.0 (default = 1.0)
// color_id = 1: Optimized(black or white), 2: Black, 3: White, 4: Green (default = 1)
-E_API void e_comp_image_filter_edge_detection_param_set(double thickness, unsigned int color_id);
+E_API Eina_Bool e_comp_image_filter_edge_detection_param_set(double thickness, unsigned int color_id);
E_API E_Comp_Image_Filter e_comp_image_filter_get(void);
E_API void e_comp_ec_list_lock(void);