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

Side by Side Diff: printing/emf_win.cc

Issue 6879098: Fix print preview clipping issues due to scaling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Proposed modification to metafile interface. Created 9 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/emf_win.h" 5 #include "printing/emf_win.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 default: { 398 default: {
399 res = Play(); 399 res = Play();
400 break; 400 break;
401 } 401 }
402 } 402 }
403 return res; 403 return res;
404 } 404 }
405 405
406 skia::PlatformDevice* Emf::StartPageForVectorCanvas( 406 skia::PlatformDevice* Emf::StartPageForVectorCanvas(
407 const gfx::Size& page_size, const gfx::Point& content_origin, 407 const gfx::Size& page_size, const gfx::Size& conent_size,
408 const float& scale_factor) { 408 const gfx::Point& content_origin, const float& scale_factor) {
409 if (!StartPage(page_size, content_origin, scale_factor)) 409 if (!StartPage(page_size, content_origin, scale_factor))
410 return NULL; 410 return NULL;
411 411
412 return skia::VectorPlatformDeviceEmfFactory::CreateDevice(page_size.width(), 412 return skia::VectorPlatformDeviceEmfFactory::CreateDevice(page_size.width(),
413 page_size.height(), 413 page_size.height(),
414 true, hdc_); 414 true, hdc_);
415 } 415 }
416 416
417 bool Emf::StartPage(const gfx::Size& /*page_size*/, 417 bool Emf::StartPage(const gfx::Size& /*page_size*/,
418 const gfx::Point& /*content_origin*/, 418 const gfx::Point& /*content_origin*/,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } else { 474 } else {
475 DCHECK_EQ(emf.context_.handle_table, handle_table); 475 DCHECK_EQ(emf.context_.handle_table, handle_table);
476 DCHECK_EQ(emf.context_.objects_count, objects_count); 476 DCHECK_EQ(emf.context_.objects_count, objects_count);
477 DCHECK_EQ(emf.context_.hdc, hdc); 477 DCHECK_EQ(emf.context_.hdc, hdc);
478 } 478 }
479 emf.items_.push_back(Record(&emf.context_, record)); 479 emf.items_.push_back(Record(&emf.context_, record));
480 return 1; 480 return 1;
481 } 481 }
482 482
483 } // namespace printing 483 } // namespace printing
OLDNEW
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('j') | printing/metafile.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698