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

Unified Diff: ui/gfx/render_text.h

Issue 10591003: Expose GetBaseline() method on RenderText. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | ui/gfx/render_text_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
===================================================================
--- ui/gfx/render_text.h (revision 143588)
+++ ui/gfx/render_text.h (working copy)
@@ -246,12 +246,16 @@
// |GetTextDirection()|, not the direction of a particular run.
VisualCursorDirection GetVisualDirectionOfLogicalEnd();
- // Get the size in pixels of the entire string. For the height, this will
+ // Returns the size in pixels of the entire string. For the height, this will
// return the maximum height among the different fonts in the text runs.
// Note that this returns the raw size of the string, which does not include
// the margin area of text shadows.
virtual Size GetStringSize() = 0;
+ // Returns the common baseline of the text. The returned value is the vertical
+ // offset from the top of |display_rect| to the text baseline, in pixels.
+ virtual int GetBaseline() = 0;
+
void Draw(Canvas* canvas);
// Gets the SelectionModel from a visual point in local coordinates.
« no previous file with comments | « no previous file | ui/gfx/render_text_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698