diff options
author | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 21:56:39 +0000 |
---|---|---|
committer | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 21:56:39 +0000 |
commit | 04068b13e5ec0c0aa2ab0fe82990ec8146c33243 (patch) | |
tree | 9fe221539e1b44689e1958b2a66f621bf9ff0d4a | |
parent | 21ca4339a6e9ea0f251e37f33f27544a3a5a9a32 (diff) |
pdfviewer: remove sqrt from the formula computing the scale (DPI is dots per inch, not dots per square inch)
Review URL: https://codereview.chromium.org/70793003
git-svn-id: http://skia.googlecode.com/svn/trunk@12258 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | experimental/PdfViewer/pdf_viewer_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/experimental/PdfViewer/pdf_viewer_main.cpp b/experimental/PdfViewer/pdf_viewer_main.cpp index 231aaa8ed9..5e9c2e1ba9 100644 --- a/experimental/PdfViewer/pdf_viewer_main.cpp +++ b/experimental/PdfViewer/pdf_viewer_main.cpp @@ -140,8 +140,8 @@ static bool render_page(const SkString& outputDir, SkRect rect = renderer.MediaBox(page < 0 ? 0 :page); SkBitmap bitmap; - SkScalar width = SkScalarMul(rect.width(), SkDoubleToScalar(sqrt(FLAGS_DPI / 72.0))); - SkScalar height = SkScalarMul(rect.height(), SkDoubleToScalar(sqrt(FLAGS_DPI / 72.0))); + SkScalar width = SkScalarMul(rect.width(), SkDoubleToScalar(FLAGS_DPI / 72.0)); + SkScalar height = SkScalarMul(rect.height(), SkDoubleToScalar(FLAGS_DPI / 72.0)); rect = SkRect::MakeWH(width, height); |