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

Side by Side Diff: chrome/common/gfx/chrome_canvas.h

Issue 20011: Improved OTR avatar and popup window rendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « chrome/browser/views/toolbar_view.cc ('k') | chrome/common/gfx/chrome_canvas.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_GFX_CHROME_CANVAS_H_ 5 #ifndef CHROME_COMMON_GFX_CHROME_CANVAS_H_
6 #define CHROME_COMMON_GFX_CHROME_CANVAS_H_ 6 #define CHROME_COMMON_GFX_CHROME_CANVAS_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. 145 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT.
146 void DrawStringInt(const std::wstring& text, const ChromeFont& font, 146 void DrawStringInt(const std::wstring& text, const ChromeFont& font,
147 const SkColor& color, int x, int y, int w, int h, 147 const SkColor& color, int x, int y, int w, int h,
148 int flags); 148 int flags);
149 149
150 // Draws a dotted gray rectangle used for focus purposes. 150 // Draws a dotted gray rectangle used for focus purposes.
151 void DrawFocusRect(int x, int y, int width, int height); 151 void DrawFocusRect(int x, int y, int width, int height);
152 152
153 // Tiles the image in the specified region. 153 // Tiles the image in the specified region.
154 void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); 154 void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h);
155 void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y,
156 int dest_x, int dest_y, int w, int h);
155 157
156 // Extracts a bitmap from the contents of this canvas. 158 // Extracts a bitmap from the contents of this canvas.
157 SkBitmap ExtractBitmap(); 159 SkBitmap ExtractBitmap();
158 160
159 // Compute the size required to draw some text with the provided font. 161 // Compute the size required to draw some text with the provided font.
160 // Attempts to fit the text with the provided width and height. Increases 162 // Attempts to fit the text with the provided width and height. Increases
161 // height and then width as needed to make the text fit. This method 163 // height and then width as needed to make the text fit. This method
162 // supports multiple lines. 164 // supports multiple lines.
163 static void SizeStringInt(const std::wstring& test, const ChromeFont& font, 165 static void SizeStringInt(const std::wstring& test, const ChromeFont& font,
164 int *width, int* height, int flags); 166 int *width, int* height, int flags);
(...skipping 10 matching lines...) Expand all
175 177
176 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); 178 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas);
177 }; 179 };
178 180
179 #if defined(OS_WIN) 181 #if defined(OS_WIN)
180 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; 182 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint;
181 #endif 183 #endif
182 184
183 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ 185 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_
184 186
OLDNEW
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | chrome/common/gfx/chrome_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698