SK_API void sk_path_add_oval(sk_path_t*, const sk_rect_t*, sk_path_direction_t);
/**
+ Get the fill type of the path.
+*/
+SK_API sk_path_filltype_t sk_path_get_filltype(sk_path_t*);
+
+/**
+ Set the fill type of the path.
+*/
+SK_API void sk_path_set_filltype(sk_path_t*, sk_path_filltype_t);
+
+/**
* If the path is empty, return false and set the rect parameter to [0, 0, 0, 0].
* else return true and set the rect parameter to the bounds of the control-points
* of the path.
} sk_path_direction_t;
typedef enum {
+ WINDING_SK_PATH_FILLTYPE,
+ EVENODD_SK_PATH_FILLTYPE,
+ INVERSE_WINDING_SK_PATH_FILLTYPE,
+ INVERSE_EVENODD_SK_PATH_FILLTYPE,
+} sk_path_filltype_t;
+
+typedef enum {
CLAMP_SK_SHADER_TILEMODE,
REPEAT_SK_SHADER_TILEMODE,
MIRROR_SK_SHADER_TILEMODE,
as_path(cpath)->addOval(AsRect(*crect), dir);
}
+void sk_path_set_filltype(sk_path_t* cpath, sk_path_filltype_t cfilltype) {
+ SkPath::FillType filltype;
+ if (!find_sk(cfilltype, &filltype)) {
+ return;
+ }
+ as_path(cpath)->setFillType(filltype);
+}
+
+sk_path_filltype_t sk_path_get_filltype(sk_path_t *cpath) {
+ sk_path_filltype_t cfilltype;
+ if (!find_c(as_path(cpath)->getFillType(), &cfilltype)) {
+ cfilltype = WINDING_SK_PATH_FILLTYPE;
+ }
+ return cfilltype;
+}
+
bool sk_path_get_bounds(const sk_path_t* cpath, sk_rect_t* crect) {
const SkPath& path = AsPath(*cpath);
#include "sk_c_from_to.h"
const struct {
+ sk_path_filltype_t fC;
+ SkPath::FillType fSK;
+} MAKE_FROM_TO_NAME(sk_path_filltype_t)[] = {
+ { WINDING_SK_PATH_FILLTYPE, SkPath::kWinding_FillType },
+ { EVENODD_SK_PATH_FILLTYPE, SkPath::kEvenOdd_FillType },
+ { INVERSE_WINDING_SK_PATH_FILLTYPE, SkPath::kInverseWinding_FillType },
+ { INVERSE_EVENODD_SK_PATH_FILLTYPE, SkPath::kInverseEvenOdd_FillType },
+};
+#define CType sk_path_filltype_t
+#define SKType SkPath::FillType
+#define CTypeSkTypeMap MAKE_FROM_TO_NAME(sk_path_filltype_t)
+#include "sk_c_from_to.h"
+
+const struct {
sk_blurstyle_t fC;
SkBlurStyle fSK;
} MAKE_FROM_TO_NAME(sk_blurstyle_t)[] = {