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

Unified Diff: ui/gfx/render_text.h

Issue 10520017: Use pango underline metrics in RenderTextLinux. (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.cc » ('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 141008)
+++ ui/gfx/render_text.h (working copy)
@@ -48,10 +48,14 @@
void SetDrawLooper(SkDrawLooper* draw_looper);
void SetFontSmoothingSettings(bool enable_smoothing, bool enable_lcd_text);
void SetTypeface(SkTypeface* typeface);
- void SetTextSize(int size);
+ void SetTextSize(SkScalar size);
void SetFontFamilyWithStyle(const std::string& family, int font_style);
void SetForegroundColor(SkColor foreground);
void SetShader(SkShader* shader, const Rect& bounds);
+ // Sets underline metrics to use if the text will be drawn with an underline.
+ // If not set, default values based on the size of the text will be used. The
+ // two metrics must be set together.
+ void SetUnderlineMetrics(SkScalar thickness, SkScalar position);
void DrawSelection(const std::vector<Rect>& selection, SkColor color);
void DrawPosText(const SkPoint* pos,
const uint16* glyphs,
@@ -64,6 +68,8 @@
SkPaint paint_;
SkRect bounds_;
SkRefPtr<SkShader> deferred_fade_shader_;
+ SkScalar underline_thickness_;
+ SkScalar underline_position_;
DISALLOW_COPY_AND_ASSIGN(SkiaTextRenderer);
};
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698