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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 return; | 851 return; |
852 } | 852 } |
853 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), | 853 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), |
854 &content.entry()->fContent); | 854 &content.entry()->fContent); |
855 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), | 855 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), |
856 &content.entry()->fContent); | 856 &content.entry()->fContent); |
857 } | 857 } |
858 | 858 |
859 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, | 859 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, |
860 const SkRect* src, const SkRect& dst, | 860 const SkRect* src, const SkRect& dst, |
861 const SkPaint& paint) { | 861 const SkPaint& paint, |
| 862 SkCanvas::DrawBitmapRectFlags flags) { |
| 863 // TODO: this code path must be updated to respect the flags parameter |
862 SkMatrix matrix; | 864 SkMatrix matrix; |
863 SkRect bitmapBounds, tmpSrc, tmpDst; | 865 SkRect bitmapBounds, tmpSrc, tmpDst; |
864 SkBitmap tmpBitmap; | 866 SkBitmap tmpBitmap; |
865 | 867 |
866 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); | 868 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); |
867 | 869 |
868 // Compute matrix from the two rectangles | 870 // Compute matrix from the two rectangles |
869 if (src) { | 871 if (src) { |
870 tmpSrc = *src; | 872 tmpSrc = *src; |
871 } else { | 873 } else { |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 } | 1753 } |
1752 | 1754 |
1753 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 1755 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
1754 SkCanvas::Config8888) { | 1756 SkCanvas::Config8888) { |
1755 return false; | 1757 return false; |
1756 } | 1758 } |
1757 | 1759 |
1758 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { | 1760 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { |
1759 return false; | 1761 return false; |
1760 } | 1762 } |
OLD | NEW |