39 {
43 if (nullptr == bottomData) {
45 } else {
47 }
48
49 leftShift %= topData.
size();
51
52
53 int shiftToEndCount = topData.
size() - leftShift;
54 plot->moveTo(
x, topData[leftShift]);
55 fill->
moveTo(
x, topData[leftShift]);
56
57 for (int i = 1; i < shiftToEndCount; ++i) {
59 fill->
lineTo(
x, topData[i + leftShift]);
61 }
62
63 for (int i = 0; i < leftShift; ++i) {
67 }
68
69 if (bottomData) {
71
72
73 for (int i = 0; i < leftShift; ++i) {
75 fill->
lineTo(
x, (*bottomData)[leftShift - 1 - i]);
76 }
77 for (int i = 0; i < shiftToEndCount; ++i) {
79 fill->
lineTo(
x, (*bottomData)[bottomData->
size() - 1 - i]);
80 }
81 } else {
82 fill->
lineTo(
x - xDelta, yBase);
83 fill->
lineTo(xLeft, yBase);
84 }
85}
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
void incReserve(int extraPtCount, int extraVerbCount=0, int extraConicCount=0)
static void plot(SkCanvas *canvas, const char *fn, float xMin, float xMax, float yMin, float yMax, const char *label=nullptr, bool requireES3=false)