Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: gfx/canvas_skia.h

Issue 5158006: Convert SizeStringInt from taking a wstring to a string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | gfx/canvas_skia_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef GFX_CANVAS_SKIA_H_ 5 #ifndef GFX_CANVAS_SKIA_H_
6 #define GFX_CANVAS_SKIA_H_ 6 #define GFX_CANVAS_SKIA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h"
10 #include "gfx/canvas.h" 11 #include "gfx/canvas.h"
11 #include "skia/ext/platform_canvas.h" 12 #include "skia/ext/platform_canvas.h"
12 13
13 #if defined(OS_POSIX) && !defined(OS_MACOSX) 14 #if defined(OS_POSIX) && !defined(OS_MACOSX)
14 typedef struct _GdkPixbuf GdkPixbuf; 15 typedef struct _GdkPixbuf GdkPixbuf;
15 #endif 16 #endif
16 17
17 namespace gfx { 18 namespace gfx {
18 19
19 class Canvas; 20 class Canvas;
(...skipping 21 matching lines...) Expand all
41 CanvasSkia(); 42 CanvasSkia();
42 43
43 CanvasSkia(int width, int height, bool is_opaque); 44 CanvasSkia(int width, int height, bool is_opaque);
44 45
45 virtual ~CanvasSkia(); 46 virtual ~CanvasSkia();
46 47
47 // Compute the size required to draw some text with the provided font. 48 // Compute the size required to draw some text with the provided font.
48 // Attempts to fit the text with the provided width and height. Increases 49 // Attempts to fit the text with the provided width and height. Increases
49 // height and then width as needed to make the text fit. This method 50 // height and then width as needed to make the text fit. This method
50 // supports multiple lines. 51 // supports multiple lines.
51 static void SizeStringInt(const std::wstring& text, 52 static void SizeStringInt(const string16& text,
52 const gfx::Font& font, 53 const gfx::Font& font,
53 int* width, int* height, 54 int* width, int* height,
54 int flags); 55 int flags);
55 56
56 // Returns the default text alignment to be used when drawing text on a 57 // Returns the default text alignment to be used when drawing text on a
57 // gfx::CanvasSkia based on the directionality of the system locale language. 58 // gfx::CanvasSkia based on the directionality of the system locale language.
58 // This function is used by gfx::Canvas::DrawStringInt when the text alignment 59 // This function is used by gfx::Canvas::DrawStringInt when the text alignment
59 // is not specified. 60 // is not specified.
60 // 61 //
61 // This function returns either gfx::Canvas::TEXT_ALIGN_LEFT or 62 // This function returns either gfx::Canvas::TEXT_ALIGN_LEFT or
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int x, int y, int w, int h, 154 int x, int y, int w, int h,
154 int flags); 155 int flags);
155 #endif 156 #endif
156 157
157 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); 158 DISALLOW_COPY_AND_ASSIGN(CanvasSkia);
158 }; 159 };
159 160
160 } // namespace gfx; 161 } // namespace gfx;
161 162
162 #endif // GFX_CANVAS_SKIA_H_ 163 #endif // GFX_CANVAS_SKIA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | gfx/canvas_skia_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698