| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/gfx/canvas.h" | 5 #include "app/gfx/canvas.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "app/gfx/font.h" | 9 #include "app/gfx/font.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 return f; | 115 return f; |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // anonymous namespace | 118 } // anonymous namespace |
| 119 | 119 |
| 120 namespace gfx { | 120 namespace gfx { |
| 121 | 121 |
| 122 Canvas::Canvas(int width, int height, bool is_opaque) | 122 Canvas::Canvas(int width, int height, bool is_opaque) |
| 123 : skia::PlatformCanvasWin(width, height, is_opaque) { | 123 : skia::PlatformCanvas(width, height, is_opaque) { |
| 124 } | 124 } |
| 125 | 125 |
| 126 Canvas::Canvas() : skia::PlatformCanvasWin() { | 126 Canvas::Canvas() : skia::PlatformCanvas() { |
| 127 } | 127 } |
| 128 | 128 |
| 129 Canvas::~Canvas() { | 129 Canvas::~Canvas() { |
| 130 } | 130 } |
| 131 | 131 |
| 132 // static | 132 // static |
| 133 void Canvas::SizeStringInt(const std::wstring& text, | 133 void Canvas::SizeStringInt(const std::wstring& text, |
| 134 const gfx::Font& font, | 134 const gfx::Font& font, |
| 135 int *width, int *height, int flags) { | 135 int *width, int *height, int flags) { |
| 136 HDC dc = GetDC(NULL); | 136 HDC dc = GetDC(NULL); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque. | 259 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque. |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 // Draw the halo bitmap with blur. | 264 // Draw the halo bitmap with blur. |
| 265 drawBitmap(text_bitmap, SkIntToScalar(x - 1), SkIntToScalar(y - 1)); | 265 drawBitmap(text_bitmap, SkIntToScalar(x - 1), SkIntToScalar(y - 1)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace gfx | 268 } // namespace gfx |
| OLD | NEW |