Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
| 9 | 9 |
| 10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 778 &content.entry()->fContent); | 778 &content.entry()->fContent); |
| 779 SkPDFUtils::ClosePath(&content.entry()->fContent); | 779 SkPDFUtils::ClosePath(&content.entry()->fContent); |
| 780 SkPDFUtils::StrokePath(&content.entry()->fContent); | 780 SkPDFUtils::StrokePath(&content.entry()->fContent); |
| 781 } | 781 } |
| 782 break; | 782 break; |
| 783 default: | 783 default: |
| 784 SkASSERT(false); | 784 SkASSERT(false); |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 | 787 |
| 788 void SkPDFDevice::drawRect(const SkDraw& d, const SkRect& r, | 788 void SkPDFDevice::drawRect(const SkDraw& d, const SkRect& rect, |
| 789 const SkPaint& paint) { | 789 const SkPaint& paint) { |
| 790 SkRect r = rect; | |
| 791 r.sort(); | |
|
caryclark
2013/05/14 17:43:26
putting the change in the canvas will change other
| |
| 792 | |
| 790 if (paint.getPathEffect()) { | 793 if (paint.getPathEffect()) { |
| 791 if (d.fClip->isEmpty()) { | 794 if (d.fClip->isEmpty()) { |
| 792 return; | 795 return; |
| 793 } | 796 } |
| 794 SkPath path; | 797 SkPath path; |
| 795 path.addRect(r); | 798 path.addRect(r); |
| 796 drawPath(d, path, paint, NULL, true); | 799 drawPath(d, path, paint, NULL, true); |
| 797 return; | 800 return; |
| 798 } | 801 } |
| 799 | 802 |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1834 } | 1837 } |
| 1835 | 1838 |
| 1836 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 1839 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
| 1837 SkCanvas::Config8888) { | 1840 SkCanvas::Config8888) { |
| 1838 return false; | 1841 return false; |
| 1839 } | 1842 } |
| 1840 | 1843 |
| 1841 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { | 1844 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { |
| 1842 return false; | 1845 return false; |
| 1843 } | 1846 } |
| OLD | NEW |