| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |