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

Side by Side Diff: gfx/canvas.h

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « chrome/common/badge_util.cc ('k') | gfx/canvas_direct2d.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 GFX_CANVAS_H_ 5 #ifndef GFX_CANVAS_H_
6 #define GFX_CANVAS_H_ 6 #define GFX_CANVAS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/string16.h"
12 #include "gfx/native_widget_types.h" 11 #include "gfx/native_widget_types.h"
13 // TODO(beng): remove this include when we no longer depend on SkTypes. 12 // TODO(beng): remove this include when we no longer depend on SkTypes.
14 #include "skia/ext/platform_canvas.h" 13 #include "skia/ext/platform_canvas.h"
15 14
16 namespace gfx { 15 namespace gfx {
17 16
18 class Brush; 17 class Brush;
19 class CanvasSkia; 18 class CanvasSkia;
20 class Font; 19 class Font;
21 class Point; 20 class Point;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 bool filter) = 0; 164 bool filter) = 0;
166 virtual void DrawBitmapInt(const SkBitmap& bitmap, 165 virtual void DrawBitmapInt(const SkBitmap& bitmap,
167 int src_x, int src_y, int src_w, int src_h, 166 int src_x, int src_y, int src_w, int src_h,
168 int dest_x, int dest_y, int dest_w, int dest_h, 167 int dest_x, int dest_y, int dest_w, int dest_h,
169 bool filter, 168 bool filter,
170 const SkPaint& paint) = 0; 169 const SkPaint& paint) = 0;
171 170
172 // Draws text with the specified color, font and location. The text is 171 // Draws text with the specified color, font and location. The text is
173 // aligned to the left, vertically centered, clipped to the region. If the 172 // aligned to the left, vertically centered, clipped to the region. If the
174 // text is too big, it is truncated and '...' is added to the end. 173 // text is too big, it is truncated and '...' is added to the end.
175 virtual void DrawStringInt(const string16& text, const 174 virtual void DrawStringInt(const std::wstring& text, const
176 gfx::Font& font, 175 gfx::Font& font,
177 const SkColor& color, 176 const SkColor& color,
178 int x, int y, int w, int h) = 0; 177 int x, int y, int w, int h) = 0;
179 virtual void DrawStringInt(const string16& text, 178 virtual void DrawStringInt(const std::wstring& text,
180 const gfx::Font& font, 179 const gfx::Font& font,
181 const SkColor& color, 180 const SkColor& color,
182 const gfx::Rect& display_rect) = 0; 181 const gfx::Rect& display_rect) = 0;
183 182
184 // Draws text with the specified color, font and location. The last argument 183 // Draws text with the specified color, font and location. The last argument
185 // specifies flags for how the text should be rendered. It can be one of 184 // specifies flags for how the text should be rendered. It can be one of
186 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. 185 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT.
187 virtual void DrawStringInt(const string16& text, 186 virtual void DrawStringInt(const std::wstring& text,
188 const gfx::Font& font, 187 const gfx::Font& font,
189 const SkColor& color, 188 const SkColor& color,
190 int x, int y, int w, int h, 189 int x, int y, int w, int h,
191 int flags) = 0; 190 int flags) = 0;
192 191
193 // Draws a dotted gray rectangle used for focus purposes. 192 // Draws a dotted gray rectangle used for focus purposes.
194 virtual void DrawFocusRect(int x, int y, int width, int height) = 0; 193 virtual void DrawFocusRect(int x, int y, int width, int height) = 0;
195 194
196 // Tiles the image in the specified region. 195 // Tiles the image in the specified region.
197 virtual void TileImageInt(const SkBitmap& bitmap, 196 virtual void TileImageInt(const SkBitmap& bitmap,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // Returns the rectangle that is invalid. 228 // Returns the rectangle that is invalid.
230 virtual gfx::Rect GetInvalidRect() const = 0; 229 virtual gfx::Rect GetInvalidRect() const = 0;
231 230
232 // Returns the underlying Canvas. 231 // Returns the underlying Canvas.
233 virtual Canvas* AsCanvas() = 0; 232 virtual Canvas* AsCanvas() = 0;
234 }; 233 };
235 234
236 } // namespace gfx; 235 } // namespace gfx;
237 236
238 #endif // GFX_CANVAS_H_ 237 #endif // GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « chrome/common/badge_util.cc ('k') | gfx/canvas_direct2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698