aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-06 22:32:57 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-06 22:32:57 +0000
commit905379a74e307509f4f0d9ccdf96e846237f2c6c (patch)
tree12e71545b3b47a56713c9c0cd68cbe3a8160a2c0 /tools
parent383e2344936fb1bbb42c1ca02f45b048f336170a (diff)
In picture rendering tools, draw the entire scaled image.
If --scale is used, limit the size of the image drawn to the scaled picture size, rather than the original picture size. BUG=https://code.google.com/p/skia/issues/detail?id=1095 Review URL: https://codereview.appspot.com/7307054 git-svn-id: http://skia.googlecode.com/svn/trunk@7633 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index cb2c3a44f8..15d0872d73 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -139,7 +139,7 @@ void PictureRenderer::end() {
int PictureRenderer::getViewWidth() {
SkASSERT(fPicture != NULL);
- int width = fPicture->width();
+ int width = fPicture->width() * fScaleFactor;
if (fViewport.width() > 0) {
width = SkMin32(width, fViewport.width());
}
@@ -148,7 +148,7 @@ int PictureRenderer::getViewWidth() {
int PictureRenderer::getViewHeight() {
SkASSERT(fPicture != NULL);
- int height = fPicture->height();
+ int height = fPicture->height() * fScaleFactor;
if (fViewport.height() > 0) {
height = SkMin32(height, fViewport.height());
}