OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBuffer.h" | 8 #include "SkBuffer.h" |
9 #include "SkCubicClipper.h" | 9 #include "SkCubicClipper.h" |
10 #include "SkErrorInternals.h" | 10 #include "SkErrorInternals.h" |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 // only valid for a single contour | 2243 // only valid for a single contour |
2244 struct Convexicator { | 2244 struct Convexicator { |
2245 Convexicator() | 2245 Convexicator() |
2246 : fPtCount(0) | 2246 : fPtCount(0) |
2247 , fConvexity(SkPath::kConvex_Convexity) | 2247 , fConvexity(SkPath::kConvex_Convexity) |
2248 , fFirstDirection(SkPathPriv::kUnknown_FirstDirection) | 2248 , fFirstDirection(SkPathPriv::kUnknown_FirstDirection) |
2249 , fIsFinite(true) | 2249 , fIsFinite(true) |
2250 , fIsCurve(false) { | 2250 , fIsCurve(false) { |
2251 fExpectedDir = kInvalid_DirChange; | 2251 fExpectedDir = kInvalid_DirChange; |
2252 // warnings | 2252 // warnings |
| 2253 fPriorPt.set(0,0); |
2253 fLastPt.set(0, 0); | 2254 fLastPt.set(0, 0); |
2254 fCurrPt.set(0, 0); | 2255 fCurrPt.set(0, 0); |
2255 fLastVec.set(0, 0); | 2256 fLastVec.set(0, 0); |
2256 fFirstVec.set(0, 0); | 2257 fFirstVec.set(0, 0); |
2257 | 2258 |
2258 fDx = fDy = 0; | 2259 fDx = fDy = 0; |
2259 fSx = fSy = kValueNeverReturnedBySign; | 2260 fSx = fSy = kValueNeverReturnedBySign; |
2260 } | 2261 } |
2261 | 2262 |
2262 SkPath::Convexity getConvexity() const { return fConvexity; } | 2263 SkPath::Convexity getConvexity() const { return fConvexity; } |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3225 } | 3226 } |
3226 } while (!done); | 3227 } while (!done); |
3227 return SkToBool(tangents.count()) ^ isInverse; | 3228 return SkToBool(tangents.count()) ^ isInverse; |
3228 } | 3229 } |
3229 | 3230 |
3230 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, | 3231 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo
int& p2, |
3231 SkScalar w, SkPoint pts[], int pow2) { | 3232 SkScalar w, SkPoint pts[], int pow2) { |
3232 const SkConic conic(p0, p1, p2, w); | 3233 const SkConic conic(p0, p1, p2, w); |
3233 return conic.chopIntoQuadsPOW2(pts, pow2); | 3234 return conic.chopIntoQuadsPOW2(pts, pow2); |
3234 } | 3235 } |
OLD | NEW |