| 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 #ifndef SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
| 9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
| 10 | 10 |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 /** | 506 /** |
| 507 * Applies any/all effects (patheffect, stroking) to src, returning the | 507 * Applies any/all effects (patheffect, stroking) to src, returning the |
| 508 * result in dst. The result is that drawing src with this paint will be | 508 * result in dst. The result is that drawing src with this paint will be |
| 509 * the same as drawing dst with a default paint (at least from the | 509 * the same as drawing dst with a default paint (at least from the |
| 510 * geometric perspective). | 510 * geometric perspective). |
| 511 * | 511 * |
| 512 * @param src input path | 512 * @param src input path |
| 513 * @param dst output path (may be the same as src) | 513 * @param dst output path (may be the same as src) |
| 514 * @param cullRect If not null, the dst path may be culled to this rect. | 514 * @param cullRect If not null, the dst path may be culled to this rect. |
| 515 * @param resScale If > 1, increase precision, else if (0 < res < 1) reduce
precision |
| 516 * in favor of speed/size. |
| 515 * @return true if the path should be filled, or false if it should be | 517 * @return true if the path should be filled, or false if it should be |
| 516 * drawn with a hairline (width == 0) | 518 * drawn with a hairline (width == 0) |
| 517 */ | 519 */ |
| 518 bool getFillPath(const SkPath& src, SkPath* dst, | 520 bool getFillPath(const SkPath& src, SkPath* dst, const SkRect* cullRect, |
| 519 const SkRect* cullRect = NULL) const; | 521 SkScalar resScale = 1) const; |
| 522 |
| 523 bool getFillPath(const SkPath& src, SkPath* dst) const { |
| 524 return this->getFillPath(src, dst, NULL, 1); |
| 525 } |
| 520 | 526 |
| 521 /** Get the paint's shader object. | 527 /** Get the paint's shader object. |
| 522 <p /> | 528 <p /> |
| 523 The shader's reference count is not affected. | 529 The shader's reference count is not affected. |
| 524 @return the paint's shader (or NULL) | 530 @return the paint's shader (or NULL) |
| 525 */ | 531 */ |
| 526 SkShader* getShader() const { return fShader; } | 532 SkShader* getShader() const { return fShader; } |
| 527 | 533 |
| 528 /** Set or clear the shader object. | 534 /** Set or clear the shader object. |
| 529 * Shaders specify the source color(s) for what is being drawn. If a paint | 535 * Shaders specify the source color(s) for what is being drawn. If a paint |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 friend class GrBitmapTextContext; | 1136 friend class GrBitmapTextContext; |
| 1131 friend class GrDistanceFieldTextContext; | 1137 friend class GrDistanceFieldTextContext; |
| 1132 friend class GrStencilAndCoverTextContext; | 1138 friend class GrStencilAndCoverTextContext; |
| 1133 friend class GrPathRendering; | 1139 friend class GrPathRendering; |
| 1134 friend class GrGLPathRendering; | 1140 friend class GrGLPathRendering; |
| 1135 friend class SkTextToPathIter; | 1141 friend class SkTextToPathIter; |
| 1136 friend class SkCanonicalizePaint; | 1142 friend class SkCanonicalizePaint; |
| 1137 }; | 1143 }; |
| 1138 | 1144 |
| 1139 #endif | 1145 #endif |
| OLD | NEW |