OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkGeometry_DEFINED | 10 #ifndef SkGeometry_DEFINED |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 */ | 248 */ |
249 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; | 249 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; |
250 | 250 |
251 bool findXExtrema(SkScalar* t) const; | 251 bool findXExtrema(SkScalar* t) const; |
252 bool findYExtrema(SkScalar* t) const; | 252 bool findYExtrema(SkScalar* t) const; |
253 bool chopAtXExtrema(SkConic dst[2]) const; | 253 bool chopAtXExtrema(SkConic dst[2]) const; |
254 bool chopAtYExtrema(SkConic dst[2]) const; | 254 bool chopAtYExtrema(SkConic dst[2]) const; |
255 | 255 |
256 void computeTightBounds(SkRect* bounds) const; | 256 void computeTightBounds(SkRect* bounds) const; |
257 void computeFastBounds(SkRect* bounds) const; | 257 void computeFastBounds(SkRect* bounds) const; |
258 | |
259 // Find the parameter value where the conic takes on its maximum curvature. | |
reed1
2014/02/21 17:09:41
nit: /** style comments match others in (esp. publ
| |
260 // Returns true if the max curvature is inside the 0..1 parameter range, | |
261 // otherwise returns false and leaves its t parameter unchanged. | |
262 bool findMaxCurvature(SkScalar* t) const; | |
258 }; | 263 }; |
259 | 264 |
260 #include "SkTemplates.h" | 265 #include "SkTemplates.h" |
261 | 266 |
262 /** | 267 /** |
263 * Help class to allocate storage for approximating a conic with N quads. | 268 * Help class to allocate storage for approximating a conic with N quads. |
264 */ | 269 */ |
265 class SkAutoConicToQuads { | 270 class SkAutoConicToQuads { |
266 public: | 271 public: |
267 SkAutoConicToQuads() : fQuadCount(0) {} | 272 SkAutoConicToQuads() : fQuadCount(0) {} |
(...skipping 30 matching lines...) Expand all Loading... | |
298 private: | 303 private: |
299 enum { | 304 enum { |
300 kQuadCount = 8, // should handle most conics | 305 kQuadCount = 8, // should handle most conics |
301 kPointCount = 1 + 2 * kQuadCount, | 306 kPointCount = 1 + 2 * kQuadCount, |
302 }; | 307 }; |
303 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; | 308 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; |
304 int fQuadCount; // #quads for current usage | 309 int fQuadCount; // #quads for current usage |
305 }; | 310 }; |
306 | 311 |
307 #endif | 312 #endif |
OLD | NEW |