| 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 SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
| 9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
| 10 | 10 |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 */ | 529 */ |
| 530 void clipPath(const SkPath& path, ClipOp op, bool doAntiAlias); | 530 void clipPath(const SkPath& path, ClipOp op, bool doAntiAlias); |
| 531 void clipPath(const SkPath& path, ClipOp op) { | 531 void clipPath(const SkPath& path, ClipOp op) { |
| 532 this->clipPath(path, op, false); | 532 this->clipPath(path, op, false); |
| 533 } | 533 } |
| 534 void clipPath(const SkPath& path, bool doAntiAlias = false) { | 534 void clipPath(const SkPath& path, bool doAntiAlias = false) { |
| 535 this->clipPath(path, kIntersect_Op, doAntiAlias); | 535 this->clipPath(path, kIntersect_Op, doAntiAlias); |
| 536 } | 536 } |
| 537 | 537 |
| 538 /** EXPERIMENTAL -- only used for testing | 538 /** EXPERIMENTAL -- only used for testing |
| 539 Set to false to force clips to be hard, even if doAntiAlias=true is | |
| 540 passed to clipRect or clipPath. | |
| 541 */ | |
| 542 void setAllowSoftClip(bool allow) { | |
| 543 fAllowSoftClip = allow; | |
| 544 } | |
| 545 | |
| 546 /** EXPERIMENTAL -- only used for testing | |
| 547 Set to simplify clip stack using path ops. | 539 Set to simplify clip stack using path ops. |
| 548 */ | 540 */ |
| 549 void setAllowSimplifyClip(bool allow) { | 541 void setAllowSimplifyClip(bool allow) { |
| 550 fAllowSimplifyClip = allow; | 542 fAllowSimplifyClip = allow; |
| 551 } | 543 } |
| 552 | 544 |
| 553 /** Modify the current clip with the specified region. Note that unlike | 545 /** Modify the current clip with the specified region. Note that unlike |
| 554 clipRect() and clipPath() which transform their arguments by the current | 546 clipRect() and clipPath() which transform their arguments by the current |
| 555 matrix, clipRegion() assumes its argument is already in device | 547 matrix, clipRegion() assumes its argument is already in device |
| 556 coordinates, and so no transformation is performed. | 548 coordinates, and so no transformation is performed. |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 | 1747 |
| 1756 class SkCanvasClipVisitor { | 1748 class SkCanvasClipVisitor { |
| 1757 public: | 1749 public: |
| 1758 virtual ~SkCanvasClipVisitor(); | 1750 virtual ~SkCanvasClipVisitor(); |
| 1759 virtual void clipRect(const SkRect&, SkCanvas::ClipOp, bool antialias) = 0; | 1751 virtual void clipRect(const SkRect&, SkCanvas::ClipOp, bool antialias) = 0; |
| 1760 virtual void clipRRect(const SkRRect&, SkCanvas::ClipOp, bool antialias) = 0
; | 1752 virtual void clipRRect(const SkRRect&, SkCanvas::ClipOp, bool antialias) = 0
; |
| 1761 virtual void clipPath(const SkPath&, SkCanvas::ClipOp, bool antialias) = 0; | 1753 virtual void clipPath(const SkPath&, SkCanvas::ClipOp, bool antialias) = 0; |
| 1762 }; | 1754 }; |
| 1763 | 1755 |
| 1764 #endif | 1756 #endif |
| OLD | NEW |