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

Side by Side Diff: ui/gfx/pango_util.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/matrix3_f.h ('k') | ui/gfx/path.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_GFX_PANGO_UTIL_H_ 5 #ifndef UI_GFX_PANGO_UTIL_H_
6 #define UI_GFX_PANGO_UTIL_H_ 6 #define UI_GFX_PANGO_UTIL_H_
7 7
8 #include <cairo/cairo.h> 8 #include <cairo/cairo.h>
9 #include <pango/pango.h> 9 #include <pango/pango.h>
10 #include <string> 10 #include <string>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 PangoFontDescription* get() { return description_; } 45 PangoFontDescription* get() { return description_; }
46 46
47 private: 47 private:
48 PangoFontDescription* description_; 48 PangoFontDescription* description_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ScopedPangoFontDescription); 50 DISALLOW_COPY_AND_ASSIGN(ScopedPangoFontDescription);
51 }; 51 };
52 52
53 // Uses Pango to draw text onto |cr|. This is the public method for d 53 // Uses Pango to draw text onto |cr|. This is the public method for d
54 void UI_EXPORT DrawTextOntoCairoSurface(cairo_t* cr, 54 void GFX_EXPORT DrawTextOntoCairoSurface(cairo_t* cr,
55 const base::string16& text, 55 const base::string16& text,
56 const gfx::Font& font, 56 const gfx::Font& font,
57 const gfx::Rect& bounds, 57 const gfx::Rect& bounds,
58 const gfx::Rect& clip, 58 const gfx::Rect& clip,
59 SkColor text_color, 59 SkColor text_color,
60 int flags); 60 int flags);
61 61
62 // ---------------------------------------------------------------------------- 62 // ----------------------------------------------------------------------------
63 // All other methods in this file are only to be used within the ui/ directory. 63 // All other methods in this file are only to be used within the ui/ directory.
64 // They are shared with internal skia interfaces. 64 // They are shared with internal skia interfaces.
65 // ---------------------------------------------------------------------------- 65 // ----------------------------------------------------------------------------
66 66
67 // Setup pango |layout|; set the |text|, the font description based on |font|, 67 // Setup pango |layout|; set the |text|, the font description based on |font|,
68 // the |width| in PANGO_SCALE for RTL locale, the base |text_direction|, 68 // the |width| in PANGO_SCALE for RTL locale, the base |text_direction|,
69 // alignment, ellipsis, word wrapping, resolution, etc. 69 // alignment, ellipsis, word wrapping, resolution, etc.
70 void SetupPangoLayout(PangoLayout* layout, 70 void SetupPangoLayout(PangoLayout* layout,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font); 107 size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font);
108 108
109 // Retrieves the Pango metrics for a Pango font description. Caches the metrics 109 // Retrieves the Pango metrics for a Pango font description. Caches the metrics
110 // and never frees them. The metrics objects are relatively small and very 110 // and never frees them. The metrics objects are relatively small and very
111 // expensive to look up. 111 // expensive to look up.
112 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc); 112 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc);
113 113
114 } // namespace gfx 114 } // namespace gfx
115 115
116 #endif // UI_GFX_PANGO_UTIL_H_ 116 #endif // UI_GFX_PANGO_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/matrix3_f.h ('k') | ui/gfx/path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698