| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 DCHECK_NE(saved_state, 0); | 60 DCHECK_NE(saved_state, 0); |
| 61 | 61 |
| 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 mutable_.shrink_factor); | 70 page.shrink_factor()); |
| 71 | 71 |
| 72 if (!page.metafile()->SafePlayback(context)) { | 72 if (!page.metafile()->SafePlayback(context)) { |
| 73 NOTREACHED(); | 73 NOTREACHED(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 BOOL res = RestoreDC(context, saved_state); | 76 BOOL res = RestoreDC(context, saved_state); |
| 77 DCHECK_NE(res, 0); | 77 DCHECK_NE(res, 0); |
| 78 } | 78 } |
| 79 | 79 |
| 80 int res = RestoreDC(context, saved_state); | 80 int res = RestoreDC(context, saved_state); |
| 81 DCHECK_NE(res, 0); | 81 DCHECK_NE(res, 0); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace printing | 84 } // namespace printing |
| OLD | NEW |