#pragma once
#include "include/core/SkTypes.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTDArray.h"
namespace pk {
class SkPath;
struct SkRect;
enum SkPathOp {
kDifference_SkPathOp, kIntersect_SkPathOp, kUnion_SkPathOp, kXOR_SkPathOp, kReverseDifference_SkPathOp, };
bool PK_API Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result);
bool PK_API Simplify(const SkPath& path, SkPath* result);
bool PK_API TightBounds(const SkPath& path, SkRect* result);
bool PK_API AsWinding(const SkPath& path, SkPath* result);
class PK_API SkOpBuilder {
public:
void add(const SkPath& path, SkPathOp _operator);
bool resolve(SkPath* result);
private:
SkTArray<SkPath> fPathRefs;
SkTDArray<SkPathOp> fOps;
static bool FixWinding(SkPath* path);
static void ReversePath(SkPath* path);
void reset();
};
}