aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/pdf
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-29 01:38:50 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-29 01:38:50 +0000
commitbefebb8a8437ce69e3a416b417cb27b66273128d (patch)
tree0be7581b26fafa6d2970961dbcc51f6206880df5 /include/pdf
parent9d0d195ca4ca2488e9999397670387c7a454d8b8 (diff)
[PDF] Honor srcRect in drawBitmap.
Review URL: http://codereview.appspot.com/4083045 git-svn-id: http://skia.googlecode.com/svn/trunk@745 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf')
-rw-r--r--include/pdf/SkPDFDevice.h2
-rw-r--r--include/pdf/SkPDFImage.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index 7395373c33..b6bc7bed15 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -178,7 +178,7 @@ private:
void popGS();
void setTextTransform(SkScalar x, SkScalar y, SkScalar textSkewX);
void internalDrawBitmap(const SkMatrix& matrix, const SkBitmap& bitmap,
- const SkPaint& paint);
+ const SkIRect* srcRect, const SkPaint& paint);
SkMatrix setTransform(const SkMatrix& matrix);
};
diff --git a/include/pdf/SkPDFImage.h b/include/pdf/SkPDFImage.h
index 6e5ee37926..48d6398616 100644
--- a/include/pdf/SkPDFImage.h
+++ b/include/pdf/SkPDFImage.h
@@ -22,6 +22,7 @@
#include "SkRefCnt.h"
class SkBitmap;
+class SkIRect;
class SkPaint;
class SkPDFCatalog;
@@ -40,7 +41,8 @@ public:
* @param bitmap The image to use.
* @param paint Used to calculate alpha, masks, etc.
*/
- SkPDFImage(const SkBitmap& bitmap, const SkPaint& paint);
+ SkPDFImage(const SkBitmap& bitmap, const SkIRect& srcRect,
+ const SkPaint& paint);
virtual ~SkPDFImage();
// The SkPDFObject interface.