} Evas_Vg_Gradient_Spread;
/**
+ * @brief Specifies how an image content get filled.
+ * @ref evas_vg_shape_fill_rule_set
+ *
+ * @since 1.25.1
+ */
+typedef enum Evas_Vg_Fill_Rule_Type
+{
+ EVAS_VG_FILL_RULE_WINDING = 0, /**< Draw a horizontal line from the point to
+ * a location outside the shape. Determine whether
+ * the direction of the line at each intersection point
+ * is up or down. The winding number is determined by
+ * summing the direction of each intersection. If the number
+ * is non zero, the point is inside the shape. This mode is
+ * the default */
+ EVAS_VG_FILL_RULE_ODD_EVEN /**< Draw a horizontal line from the point to a location outside
+ * the shape, and count the number of intersections. If the number
+ * of intersections is an odd number, the point is inside the
+ * shape. */
+} Evas_Vg_Fill_Rule;
+
+/**
* @brief Type describing dash.
* @ref evas_vg_shape_stroke_dash_set
*
EAPI void evas_vg_shape_stroke_join_set(Evas_Vg_Shape *obj, Evas_Vg_Join j);
/**
+ * @brief Sets the fill rule to be used.
+ *
+ * @param[in] obj The object.
+ * @param[in] r The fill rule to use, default is EVAS_VG_FILL_RULE_WINDING.
+ *
+ * @since 1.25.1
+ */
+EAPI void evas_vg_shape_fill_rule_set(Evas_Vg_Shape *obj, Evas_Vg_Fill_Rule r);
+
+/**
* @brief Set the list of commands and points to be used to create the
* content of shape.
*
}
EAPI void
+evas_vg_shape_fill_rule_set(Evas_Vg_Shape *obj, Evas_Vg_Fill_Rule r)
+{
+#ifdef HAVE_THORVG
+ tvg_shape_set_fill_rule(_get_tvg_shape(obj), (Tvg_Stroke_Cap) r);
+#else
+ efl_gfx_shape_fill_rule_set(obj, (Efl_Gfx_Fill_Rule) r);
+#endif
+}
+
+EAPI void
evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const double *points)
{
if (!op || !points) return;
}
//3: Fill Rule
- #ifndef HAVE_THORVG
if (node->mFillRule == FillEvenOdd)
- efl_gfx_shape_fill_rule_set(shape, EFL_GFX_FILL_RULE_ODD_EVEN);
+ evas_vg_shape_fill_rule_set(shape, EVAS_VG_FILL_RULE_ODD_EVEN);
else if (node->mFillRule == FillWinding)
- efl_gfx_shape_fill_rule_set(shape, EFL_GFX_FILL_RULE_WINDING);
- #endif
+ evas_vg_shape_fill_rule_set(shape, EVAS_VG_FILL_RULE_WINDING);
}
}