Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Unified Diff: src/doc/SkDocument_PDF.cpp

Issue 711133002: SkDocument_PDF does somthing with the trimBox parameter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/doc/SkDocument_PDF.cpp
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp
index 781885dc1317a74fe1ddb883d7b361d5a851968a..bc91a969e68826c5266d2e7941440902364c7648 100644
--- a/src/doc/SkDocument_PDF.cpp
+++ b/src/doc/SkDocument_PDF.cpp
@@ -44,6 +44,8 @@ protected:
fDevice->setRasterDpi(fRasterDpi);
}
fCanvas = SkNEW_ARGS(SkCanvas, (fDevice));
+ fCanvas->translate(trimBox.x(), trimBox.y());
+ fCanvas->clipRect(SkRect::MakeWH(trimBox.width(), trimBox.height()));
vandebo (ex-Chrome) 2014/11/11 15:44:53 Do headers and footers still work with this approa
return fCanvas;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698