summaryrefslogtreecommitdiffstats
path: root/ui/gfx/pango_util.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 23:39:06 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 23:39:06 +0000
commitd0da02d6602c55147baed1612540c07369a8d5ae (patch)
tree1623bc93f1c02dec68ca28c23ef162541bc9422d /ui/gfx/pango_util.h
parentfa00fe8a856b2bb37fa28875313f8b1de6f905fb (diff)
downloadchromium_src-d0da02d6602c55147baed1612540c07369a8d5ae.zip
chromium_src-d0da02d6602c55147baed1612540c07369a8d5ae.tar.gz
chromium_src-d0da02d6602c55147baed1612540c07369a8d5ae.tar.bz2
ui/gfx: Move pango related functions to pango_util.{h,cc}.
R=xji@chromium.org Review URL: https://chromiumcodereview.appspot.com/9554016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/pango_util.h')
-rw-r--r--ui/gfx/pango_util.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h
index 544d21d..8466c3b 100644
--- a/ui/gfx/pango_util.h
+++ b/ui/gfx/pango_util.h
@@ -12,10 +12,10 @@
#include "base/i18n/rtl.h"
#include "base/string16.h"
-#include "ui/base/ui_export.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/base/ui_export.h"
-// TODO(xji): move other pango related functions from gtk_util to here.
+typedef struct _PangoContext PangoContext;
namespace gfx {
@@ -23,6 +23,13 @@ class Font;
class PlatformFontPango;
class Rect;
+// Creates and returns a PangoContext. The caller owns the context.
+PangoContext* GetPangoContext();
+
+// Returns the resolution (DPI) used by pango. A negative values means the
+// resolution hasn't been set.
+double GetPangoResolution();
+
// Uses Pango to draw text onto |cr|. This is the public method for d
void UI_EXPORT DrawTextOntoCairoSurface(cairo_t* cr,
const string16& text,