| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 // Draws a single pixel line in the specified region with the specified | 99 // Draws a single pixel line in the specified region with the specified |
| 100 // color, using a transfer mode of SkPorterDuff::kSrcOver_Mode. | 100 // color, using a transfer mode of SkPorterDuff::kSrcOver_Mode. |
| 101 void DrawRectInt(const SkColor& color, int x, int y, int w, int h); | 101 void DrawRectInt(const SkColor& color, int x, int y, int w, int h); |
| 102 | 102 |
| 103 // Draws a single pixel line in the specified region with the specified | 103 // Draws a single pixel line in the specified region with the specified |
| 104 // color and transfer mode. | 104 // color and transfer mode. |
| 105 void DrawRectInt(const SkColor& color, int x, int y, int w, int h, | 105 void DrawRectInt(const SkColor& color, int x, int y, int w, int h, |
| 106 SkPorterDuff::Mode mode); | 106 SkPorterDuff::Mode mode); |
| 107 | 107 |
| 108 // Draws a single pixel line with the specified color. |
| 109 void DrawLineInt(const SkColor& color, int x1, int y1, int x2, int y2); |
| 110 |
| 108 // Draws a bitmap with the origin at the specified location. The upper left | 111 // Draws a bitmap with the origin at the specified location. The upper left |
| 109 // corner of the bitmap is rendered at the specified location. | 112 // corner of the bitmap is rendered at the specified location. |
| 110 void DrawBitmapInt(const SkBitmap& bitmap, int x, int y); | 113 void DrawBitmapInt(const SkBitmap& bitmap, int x, int y); |
| 111 | 114 |
| 112 // Draws a bitmap with the origin at the specified location, using the | 115 // Draws a bitmap with the origin at the specified location, using the |
| 113 // specified paint. The upper left corner of the bitmap is rendered at the | 116 // specified paint. The upper left corner of the bitmap is rendered at the |
| 114 // specified location. | 117 // specified location. |
| 115 void DrawBitmapInt(const SkBitmap& bitmap, int x, int y, | 118 void DrawBitmapInt(const SkBitmap& bitmap, int x, int y, |
| 116 const SkPaint& paint); | 119 const SkPaint& paint); |
| 117 | 120 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 #endif | 189 #endif |
| 187 | 190 |
| 188 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); | 191 DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 #if defined(OS_WIN) || defined(TOOLKIT_GTK) | 194 #if defined(OS_WIN) || defined(TOOLKIT_GTK) |
| 192 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; | 195 typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; |
| 193 #endif | 196 #endif |
| 194 | 197 |
| 195 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ | 198 #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ |
| OLD | NEW |