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

Side by Side Diff: printing/printed_document_win.cc

Issue 599733002: StartPage/EndPage from spooling code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Sep 23 18:18:33 PDT 2014 Created 6 years, 3 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
« no previous file with comments | « printing/emf_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/printed_document.h" 5 #include "printing/printed_document.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "printing/page_number.h" 8 #include "printing/page_number.h"
9 #include "printing/printed_pages_source.h" 9 #include "printing/printed_pages_source.h"
10 #include "printing/printed_page.h" 10 #include "printing/printed_page.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Setup the matrix to translate and scale to the right place. Take in 62 // Setup the matrix to translate and scale to the right place. Take in
63 // account the actual shrinking factor. 63 // account the actual shrinking factor.
64 // Note that the printing output is relative to printable area of the page. 64 // Note that the printing output is relative to printable area of the page.
65 // That is 0,0 is offset by PHYSICALOFFSETX/Y from the page. 65 // That is 0,0 is offset by PHYSICALOFFSETX/Y from the page.
66 SimpleModifyWorldTransform( 66 SimpleModifyWorldTransform(
67 context, 67 context,
68 content_area.x() - page_setup.printable_area().x(), 68 content_area.x() - page_setup.printable_area().x(),
69 content_area.y() - page_setup.printable_area().y(), 69 content_area.y() - page_setup.printable_area().y(),
70 page.shrink_factor()); 70 page.shrink_factor());
71 71
72 ::StartPage(context);
72 if (!page.metafile()->SafePlayback(context)) { 73 if (!page.metafile()->SafePlayback(context)) {
73 NOTREACHED(); 74 NOTREACHED();
74 } 75 }
76 ::EndPage(context);
75 77
76 BOOL res = RestoreDC(context, saved_state); 78 BOOL res = RestoreDC(context, saved_state);
77 DCHECK_NE(res, 0); 79 DCHECK_NE(res, 0);
78 } 80 }
79 81
80 int res = RestoreDC(context, saved_state); 82 int res = RestoreDC(context, saved_state);
81 DCHECK_NE(res, 0); 83 DCHECK_NE(res, 0);
82 } 84 }
83 85
84 } // namespace printing 86 } // namespace printing
OLDNEW
« no previous file with comments | « printing/emf_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698