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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 return; | 957 return; |
958 } | 958 } |
959 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), | 959 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), |
960 &content.entry()->fContent); | 960 &content.entry()->fContent); |
961 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), | 961 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), |
962 &content.entry()->fContent); | 962 &content.entry()->fContent); |
963 } | 963 } |
964 | 964 |
965 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, | 965 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, |
966 const SkRect* src, const SkRect& dst, | 966 const SkRect* src, const SkRect& dst, |
967 const SkPaint& paint) { | 967 const SkPaint& paint, |
| 968 SkCanvas::DrawBitmapRectFlags flags) { |
| 969 // TODO: this code path must be updated to respect the flags parameter |
968 SkMatrix matrix; | 970 SkMatrix matrix; |
969 SkRect bitmapBounds, tmpSrc, tmpDst; | 971 SkRect bitmapBounds, tmpSrc, tmpDst; |
970 SkBitmap tmpBitmap; | 972 SkBitmap tmpBitmap; |
971 | 973 |
972 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); | 974 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); |
973 | 975 |
974 // Compute matrix from the two rectangles | 976 // Compute matrix from the two rectangles |
975 if (src) { | 977 if (src) { |
976 tmpSrc = *src; | 978 tmpSrc = *src; |
977 } else { | 979 } else { |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 } | 1922 } |
1921 | 1923 |
1922 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 1924 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
1923 SkCanvas::Config8888) { | 1925 SkCanvas::Config8888) { |
1924 return false; | 1926 return false; |
1925 } | 1927 } |
1926 | 1928 |
1927 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { | 1929 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { |
1928 return false; | 1930 return false; |
1929 } | 1931 } |
OLD | NEW |