OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/canvas_skia.h" | 5 #include "ui/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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 void CanvasSkia::DrawStringInt(const string16& text, | 289 void CanvasSkia::DrawStringInt(const string16& text, |
290 const gfx::Font& font, | 290 const gfx::Font& font, |
291 const SkColor& color, | 291 const SkColor& color, |
292 const gfx::Rect& display_rect) { | 292 const gfx::Rect& display_rect) { |
293 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), | 293 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), |
294 display_rect.width(), display_rect.height()); | 294 display_rect.width(), display_rect.height()); |
295 } | 295 } |
296 | 296 |
| 297 // TODO(msw): Common implementation calls a RenderText function??? |
| 298 //void CanvasSkia::DrawStringInt(const gfx::RenderText& render_text) { |
| 299 // NOTIMPLEMENTED(); |
| 300 //} |
| 301 |
297 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, | 302 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, |
298 int x, int y, int w, int h) { | 303 int x, int y, int w, int h) { |
299 TileImageInt(bitmap, 0, 0, x, y, w, h); | 304 TileImageInt(bitmap, 0, 0, x, y, w, h); |
300 } | 305 } |
301 | 306 |
302 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, | 307 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, |
303 int src_x, int src_y, | 308 int src_x, int src_y, |
304 int dest_x, int dest_y, int w, int h) { | 309 int dest_x, int dest_y, int w, int h) { |
305 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) | 310 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) |
306 return; | 311 return; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 392 |
388 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { | 393 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
389 #if defined(OS_WIN) | 394 #if defined(OS_WIN) |
390 return new CanvasPaintWin(view); | 395 return new CanvasPaintWin(view); |
391 #else | 396 #else |
392 return NULL; | 397 return NULL; |
393 #endif | 398 #endif |
394 } | 399 } |
395 | 400 |
396 } // namespace gfx | 401 } // namespace gfx |
OLD | NEW |