| 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 APP_GFX_CANVAS_H_ | 5 #ifndef APP_GFX_CANVAS_H_ |
| 6 #define APP_GFX_CANVAS_H_ | 6 #define APP_GFX_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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 // Draws a dotted gray rectangle used for focus purposes. | 174 // Draws a dotted gray rectangle used for focus purposes. |
| 175 void DrawFocusRect(int x, int y, int width, int height); | 175 void DrawFocusRect(int x, int y, int width, int height); |
| 176 | 176 |
| 177 // Tiles the image in the specified region. | 177 // Tiles the image in the specified region. |
| 178 void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); | 178 void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); |
| 179 void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, | 179 void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, |
| 180 int dest_x, int dest_y, int w, int h); | 180 int dest_x, int dest_y, int w, int h); |
| 181 | 181 |
| 182 // Extracts a bitmap from the contents of this canvas. | 182 // Extracts a bitmap from the contents of this canvas. |
| 183 SkBitmap ExtractBitmap(); | 183 SkBitmap ExtractBitmap() const; |
| 184 | 184 |
| 185 #if defined(OS_LINUX) | 185 #if defined(OS_LINUX) |
| 186 // Applies current matrix on the canvas to the cairo context. This should be | 186 // Applies current matrix on the canvas to the cairo context. This should be |
| 187 // invoked anytime you plan on drawing directly to the cairo context. Be | 187 // invoked anytime you plan on drawing directly to the cairo context. Be |
| 188 // sure and set the matrix back to the identity when done. | 188 // sure and set the matrix back to the identity when done. |
| 189 void ApplySkiaMatrixToCairoContext(cairo_t* cr); | 189 void ApplySkiaMatrixToCairoContext(cairo_t* cr); |
| 190 | 190 |
| 191 // Draw the pixbuf in its natural size at (x, y). | 191 // Draw the pixbuf in its natural size at (x, y). |
| 192 void DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y); | 192 void DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y); |
| 193 #endif | 193 #endif |
| (...skipping 14 matching lines...) Expand all Loading... |
| 208 const SkColor& color, int x, int y, int w, int h, | 208 const SkColor& color, int x, int y, int w, int h, |
| 209 int flags); | 209 int flags); |
| 210 #endif | 210 #endif |
| 211 | 211 |
| 212 DISALLOW_COPY_AND_ASSIGN(Canvas); | 212 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 } // namespace gfx; | 215 } // namespace gfx; |
| 216 | 216 |
| 217 #endif // APP_GFX_CANVAS_H_ | 217 #endif // APP_GFX_CANVAS_H_ |
| OLD | NEW |