OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 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 | 8 |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 if (NULL != bounds) { | 1674 if (NULL != bounds) { |
1675 *bounds = clip.getBounds(); | 1675 *bounds = clip.getBounds(); |
1676 } | 1676 } |
1677 return true; | 1677 return true; |
1678 } | 1678 } |
1679 | 1679 |
1680 const SkMatrix& SkCanvas::getTotalMatrix() const { | 1680 const SkMatrix& SkCanvas::getTotalMatrix() const { |
1681 return fMCRec->fMatrix; | 1681 return fMCRec->fMatrix; |
1682 } | 1682 } |
1683 | 1683 |
1684 #ifdef SK_SUPPORT_LEGACY_GETCLIPTYPE | |
1685 SkCanvas::ClipType SkCanvas::getClipType() const { | |
1686 if (fMCRec->fRasterClip.isEmpty()) { | |
1687 return kEmpty_ClipType; | |
1688 } | |
1689 if (fMCRec->fRasterClip.isRect()) { | |
1690 return kRect_ClipType; | |
1691 } | |
1692 return kComplex_ClipType; | |
1693 } | |
1694 #endif | |
1695 | |
1696 const SkRegion& SkCanvas::internal_private_getTotalClip() const { | 1684 const SkRegion& SkCanvas::internal_private_getTotalClip() const { |
1697 return fMCRec->fRasterClip.forceGetBW(); | 1685 return fMCRec->fRasterClip.forceGetBW(); |
1698 } | 1686 } |
1699 | 1687 |
1700 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { | 1688 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { |
1701 path->reset(); | 1689 path->reset(); |
1702 | 1690 |
1703 const SkRegion& rgn = fMCRec->fRasterClip.forceGetBW(); | 1691 const SkRegion& rgn = fMCRec->fRasterClip.forceGetBW(); |
1704 if (rgn.isEmpty()) { | 1692 if (rgn.isEmpty()) { |
1705 return; | 1693 return; |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 } | 2546 } |
2559 | 2547 |
2560 if (NULL != matrix) { | 2548 if (NULL != matrix) { |
2561 canvas->concat(*matrix); | 2549 canvas->concat(*matrix); |
2562 } | 2550 } |
2563 } | 2551 } |
2564 | 2552 |
2565 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2553 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2566 fCanvas->restoreToCount(fSaveCount); | 2554 fCanvas->restoreToCount(fSaveCount); |
2567 } | 2555 } |
OLD | NEW |