OLD | NEW |
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 #include "gfx/canvas_skia.h" | 5 #include "gfx/canvas_skia.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // by the paint). | 270 // by the paint). |
271 SkPaint p(paint); | 271 SkPaint p(paint); |
272 p.setFilterBitmap(filter); | 272 p.setFilterBitmap(filter); |
273 p.setShader(shader); | 273 p.setShader(shader); |
274 shader->unref(); | 274 shader->unref(); |
275 | 275 |
276 // The rect will be filled by the bitmap. | 276 // The rect will be filled by the bitmap. |
277 drawRect(dest_rect, p); | 277 drawRect(dest_rect, p); |
278 } | 278 } |
279 | 279 |
280 void CanvasSkia::DrawStringInt(const std::wstring& text, | 280 void CanvasSkia::DrawStringInt(const string16& text, |
281 const gfx::Font& font, | 281 const gfx::Font& font, |
282 const SkColor& color, | 282 const SkColor& color, |
283 int x, int y, int w, int h) { | 283 int x, int y, int w, int h) { |
284 DrawStringInt(text, font, color, x, y, w, h, | 284 DrawStringInt(text, font, color, x, y, w, h, |
285 gfx::CanvasSkia::DefaultCanvasTextAlignment()); | 285 gfx::CanvasSkia::DefaultCanvasTextAlignment()); |
286 } | 286 } |
287 | 287 |
288 void CanvasSkia::DrawStringInt(const std::wstring& text, | 288 void CanvasSkia::DrawStringInt(const string16& text, |
289 const gfx::Font& font, | 289 const gfx::Font& font, |
290 const SkColor& color, | 290 const SkColor& color, |
291 const gfx::Rect& display_rect) { | 291 const gfx::Rect& display_rect) { |
292 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), | 292 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), |
293 display_rect.width(), display_rect.height()); | 293 display_rect.width(), display_rect.height()); |
294 } | 294 } |
295 | 295 |
296 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, | 296 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, |
297 int x, int y, int w, int h) { | 297 int x, int y, int w, int h) { |
298 TileImageInt(bitmap, 0, 0, x, y, w, h); | 298 TileImageInt(bitmap, 0, 0, x, y, w, h); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { | 383 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
384 #if defined(OS_WIN) | 384 #if defined(OS_WIN) |
385 return new CanvasPaintWin(view); | 385 return new CanvasPaintWin(view); |
386 #else | 386 #else |
387 return NULL; | 387 return NULL; |
388 #endif | 388 #endif |
389 } | 389 } |
390 | 390 |
391 } // namespace gfx | 391 } // namespace gfx |
OLD | NEW |