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 "chrome/common/gfx/chrome_canvas.h" | 5 #include "chrome/common/gfx/chrome_canvas.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
10 #include "base/logging.h" | |
11 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
12 #include "skia/include/SkShader.h" | 11 #include "skia/include/SkShader.h" |
13 #include "skia/include/SkPaint.h" | 12 #include "skia/include/SkPaint.h" |
14 #include "chrome/common/gfx/chrome_font.h" | 13 #include "chrome/common/gfx/chrome_font.h" |
15 #include "chrome/common/l10n_util.h" | 14 #include "chrome/common/l10n_util.h" |
16 | 15 |
17 ChromeCanvas::ChromeCanvas(int width, int height, bool is_opaque) | 16 ChromeCanvas::ChromeCanvas(int width, int height, bool is_opaque) |
18 : skia::PlatformCanvasLinux(width, height, is_opaque) { | 17 : skia::PlatformCanvasLinux(width, height, is_opaque) { |
19 } | 18 } |
20 | 19 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 56 } |
58 | 57 |
59 void ChromeCanvas::DrawStringInt(const std::wstring& text, | 58 void ChromeCanvas::DrawStringInt(const std::wstring& text, |
60 const ChromeFont& font, | 59 const ChromeFont& font, |
61 const SkColor& color, | 60 const SkColor& color, |
62 int x, int y, | 61 int x, int y, |
63 int w, int h) { | 62 int w, int h) { |
64 DrawStringInt(text, font, color, x, y, w, h, | 63 DrawStringInt(text, font, color, x, y, w, h, |
65 l10n_util::DefaultCanvasTextAlignment()); | 64 l10n_util::DefaultCanvasTextAlignment()); |
66 } | 65 } |
OLD | NEW |