summaryrefslogtreecommitdiffstats
path: root/gfx/canvas_skia_win.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:43:03 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:43:03 +0000
commitc6ac841f51c0b884b38e917ac30b1dfde0dc43a7 (patch)
tree2b490ffa6795f72e7232d658b766785f0de64e38 /gfx/canvas_skia_win.cc
parent6b32b95cff99ee72fd7824237ae5070263e5c496 (diff)
downloadchromium_src-c6ac841f51c0b884b38e917ac30b1dfde0dc43a7.zip
chromium_src-c6ac841f51c0b884b38e917ac30b1dfde0dc43a7.tar.gz
chromium_src-c6ac841f51c0b884b38e917ac30b1dfde0dc43a7.tar.bz2
Rework gfx::Font by moving platform-specific code into inner classes.
gfx::Font is a platform-neutral API shim that exists as a wrapper object to allow for the creation and lifetime of gfx::Font objects to remain consistent with past usage. gfx::PlatformFont is an interface implemented by the platform-specific inner classes (gfx::PlatformFontWin,Mac,Gtk). BUG=none TEST=existing unittests Review URL: http://codereview.chromium.org/3083022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/canvas_skia_win.cc')
-rw-r--r--gfx/canvas_skia_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/canvas_skia_win.cc b/gfx/canvas_skia_win.cc
index f3c5f8f..cc8a7eb 100644
--- a/gfx/canvas_skia_win.cc
+++ b/gfx/canvas_skia_win.cc
@@ -163,7 +163,7 @@ void CanvasSkia::SizeStringInt(const std::wstring& text,
RECT r = { 0, 0, *width, *height };
HDC dc = GetDC(NULL);
- HFONT old_font = static_cast<HFONT>(SelectObject(dc, font.hfont()));
+ HFONT old_font = static_cast<HFONT>(SelectObject(dc, font.GetNativeFont()));
DoDrawText(dc, clamped_string, &r,
ComputeFormatFlags(flags, clamped_string) | DT_CALCRECT);
SelectObject(dc, old_font);
@@ -212,7 +212,7 @@ void CanvasSkia::DrawStringInt(const std::wstring& text,
const gfx::Font& font,
const SkColor& color,
int x, int y, int w, int h, int flags) {
- DrawStringInt(text, font.hfont(), color, x, y, w, h, flags);
+ DrawStringInt(text, font.GetNativeFont(), color, x, y, w, h, flags);
}
// Checks each pixel immediately adjacent to the given pixel in the bitmap. If