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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 9117009: Move |PlatformFont::GetStringWidth()| implementation up into font.cc directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | ui/gfx/font.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_skia.cc
===================================================================
--- ui/gfx/canvas_skia.cc (revision 118837)
+++ ui/gfx/canvas_skia.cc (working copy)
@@ -77,6 +77,13 @@
}
// static
+int CanvasSkia::GetStringWidth(const string16& text, const gfx::Font& font) {
+ int width = 0, height = 0;
+ CanvasSkia::SizeStringInt(text, font, &width, &height, Canvas::NO_ELLIPSIS);
+ return width;
+}
+
+// static
int CanvasSkia::DefaultCanvasTextAlignment() {
if (!base::i18n::IsRTL())
return gfx::Canvas::TEXT_ALIGN_LEFT;
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | ui/gfx/font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698