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

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

Issue 18804: OpaqueNonClientView cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // specifies flags for how the text should be rendered. It can be one of 144 // specifies flags for how the text should be rendered. It can be one of
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,
155 SkPorterDuff::Mode mode);
156
157 // Tiles the image in the specified region using a transfer mode of
158 // SkPorterDuff::kSrcOver_Mode.
159 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, int dest_x,
156 int dest_y, int w, int h);
160 157
161 // Extracts a bitmap from the contents of this canvas. 158 // Extracts a bitmap from the contents of this canvas.
162 SkBitmap ExtractBitmap(); 159 SkBitmap ExtractBitmap();
163 160
164 // 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.
165 // 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
166 // 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
167 // supports multiple lines. 164 // supports multiple lines.
168 static void SizeStringInt(const std::wstring& test, const ChromeFont& font, 165 static void SizeStringInt(const std::wstring& test, const ChromeFont& font,
169 int *width, int* height, int flags); 166 int *width, int* height, int flags);
(...skipping 10 matching lines...) Expand all
180 177
181 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); 178 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas);
182 }; 179 };
183 180
184 #if defined(OS_WIN) 181 #if defined(OS_WIN)
185 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; 182 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint;
186 #endif 183 #endif
187 184
188 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ 185 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_
189 186
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/opaque_non_client_view.cc ('k') | chrome/common/gfx/chrome_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698