| 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 "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "gfx/font.h" | |
| 11 #include "printing/page_number.h" | 10 #include "printing/page_number.h" |
| 12 #include "printing/page_overlays.h" | 11 #include "printing/page_overlays.h" |
| 13 #include "printing/printed_pages_source.h" | 12 #include "printing/printed_pages_source.h" |
| 14 #include "printing/printed_page.h" | 13 #include "printing/printed_page.h" |
| 15 #include "printing/units.h" | 14 #include "printing/units.h" |
| 16 #include "skia/ext/platform_device.h" | 15 #include "skia/ext/platform_device.h" |
| 16 #include "ui/gfx/font.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 void SimpleModifyWorldTransform(HDC context, | 20 void SimpleModifyWorldTransform(HDC context, |
| 21 int offset_x, | 21 int offset_x, |
| 22 int offset_y, | 22 int offset_y, |
| 23 double shrink_factor) { | 23 double shrink_factor) { |
| 24 XFORM xform = { 0 }; | 24 XFORM xform = { 0 }; |
| 25 xform.eDx = static_cast<float>(offset_x); | 25 xform.eDx = static_cast<float>(offset_x); |
| 26 xform.eDy = static_cast<float>(offset_y); | 26 xform.eDy = static_cast<float>(offset_y); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 DCHECK(result == SIMPLEREGION || result == COMPLEXREGION); | 177 DCHECK(result == SIMPLEREGION || result == COMPLEXREGION); |
| 178 TextOut(context, | 178 TextOut(context, |
| 179 bounds.x(), bounds.y(), | 179 bounds.x(), bounds.y(), |
| 180 text.c_str(), | 180 text.c_str(), |
| 181 static_cast<int>(text.size())); | 181 static_cast<int>(text.size())); |
| 182 int res = RestoreDC(context, saved_state); | 182 int res = RestoreDC(context, saved_state); |
| 183 DCHECK_NE(res, 0); | 183 DCHECK_NE(res, 0); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace printing | 186 } // namespace printing |
| OLD | NEW |