37 using difference_type = ptrdiff_t;
38 using pointer = value_type*;
39 using reference = value_type;
40 using iterator_category = std::input_iterator_tag;
41 Iterator(
const Contours& contours,
size_t index)
44 Iterator(
const Iterator& that) : Iterator{ that.fContours, that.fIndex } { }
45 Iterator& operator++() { ++fIndex;
return *
this; }
46 Iterator operator++(
int) { Iterator tmp(*
this); operator++();
return tmp; }
47 bool operator==(
const Iterator& rhs)
const {
return fIndex == rhs.fIndex; }
48 bool operator!=(
const Iterator& rhs)
const {
return fIndex != rhs.fIndex; }
49 value_type
operator*() {
return fContours[fIndex]; }
50 friend difference_type
operator-(Iterator lhs, Iterator rhs) {
51 return lhs.fIndex - rhs.fIndex;
65 int32_t
start =
i == 0 ? 0 : fContours[
i-1].end;
71 return Iterator{*
this, 0};
74 Iterator
end()
const {
75 return Iterator{*
this, fContours.size()};
79 return fContours.size();
83 return fContours.empty();
86 std::vector<myers::Segment>
segments()
const;
90 struct CompactContour {
96 bool currentContourIsEmpty()
const;
97 void addPointToCurrentContour(
SkPoint p);
98 void moveToStartOfContour(
SkPoint p);
99 void closeContourIfNeeded();
102 SkIRect fContourBounds = kEmptyRect;
104 std::vector<Point> fPoints;
105 std::vector<CompactContour> fContours;
static const int points[]
SkSpan< const Point > points
std::vector< myers::Segment > segments() const
static constexpr double kScaleFactor
Contour operator[](size_t i) const
static Contours Make(SkPath path)
Optional< SkRect > bounds
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
bool operator==(C p1, const scoped_nsprotocol< C > &p2)
bool operator!=(C p1, const scoped_nsprotocol< C > &p2)
constexpr Color operator-(T value, const Color &c)
constexpr Color operator*(T value, const Color &c)
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)