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

Unified Diff: ui/gfx/canvas.h

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 7 years, 3 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
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index d6479cc0b12b54839ba01dd920dc4741c70af2fd..5c2d90ae84fc847019e8a4f51b96c043439fb656 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -127,24 +127,24 @@ class UI_EXPORT Canvas {
// specifying a 0 value for it will cause the default height to be used.
static void SizeStringInt(const base::string16& text,
msw 2013/09/27 21:54:48 I presume the "Int" suffix in the name of this fun
jianli 2013/10/01 00:32:58 Renamed to SizeStringToFit.
const FontList& font_list,
- int* width,
- int* height,
+ float* width,
+ float* height,
int line_height,
int flags);
// Obsolete version. Use the above version which takes FontList.
static void SizeStringInt(const base::string16& text,
const Font& font,
- int* width,
- int* height,
+ float* width,
+ float* height,
int line_height,
int flags);
// Returns the number of horizontal pixels needed to display the specified
// |text| with |font_list|.
- static int GetStringWidth(const base::string16& text,
+ static float GetStringWidth(const base::string16& text,
const FontList& font_list);
// Obsolete version. Use the above version which takes FontList.
- static int GetStringWidth(const base::string16& text, const Font& font);
+ static float GetStringWidth(const base::string16& text, const Font& font);
// Returns the default text alignment to be used when drawing text on a
// Canvas based on the directionality of the system locale language.

Powered by Google App Engine
This is Rietveld 408576698