| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
| 9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 the clips in the stack. | 47 the clips in the stack. |
| 48 | 48 |
| 49 While the Canvas holds the state of the drawing device, the state (style) | 49 While the Canvas holds the state of the drawing device, the state (style) |
| 50 of the object being drawn is held by the Paint, which is provided as a | 50 of the object being drawn is held by the Paint, which is provided as a |
| 51 parameter to each of the draw() methods. The Paint holds attributes such as | 51 parameter to each of the draw() methods. The Paint holds attributes such as |
| 52 color, typeface, textSize, strokeWidth, shader (e.g. gradients, patterns), | 52 color, typeface, textSize, strokeWidth, shader (e.g. gradients, patterns), |
| 53 etc. | 53 etc. |
| 54 */ | 54 */ |
| 55 class SK_API SkCanvas : public SkRefCnt { | 55 class SK_API SkCanvas : public SkRefCnt { |
| 56 enum PrivateSaveLayerFlags { | 56 enum PrivateSaveLayerFlags { |
| 57 kDontClipToLayer_PrivateSaveLayerFlag = 1 << 31, | 57 kDontClipToLayer_PrivateSaveLayerFlag = 1U << 31, |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 public: | 60 public: |
| 61 /** | 61 /** |
| 62 * Attempt to allocate raster canvas, matching the ImageInfo, that will dra
w directly into the | 62 * Attempt to allocate raster canvas, matching the ImageInfo, that will dra
w directly into the |
| 63 * specified pixels. To access the pixels after drawing to them, the caller
should call | 63 * specified pixels. To access the pixels after drawing to them, the caller
should call |
| 64 * flush() or call peekPixels(...). | 64 * flush() or call peekPixels(...). |
| 65 * | 65 * |
| 66 * On failure, return NULL. This can fail for several reasons: | 66 * On failure, return NULL. This can fail for several reasons: |
| 67 * 1. invalid ImageInfo (e.g. negative dimensions) | 67 * 1. invalid ImageInfo (e.g. negative dimensions) |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 | 1495 |
| 1496 class SkCanvasClipVisitor { | 1496 class SkCanvasClipVisitor { |
| 1497 public: | 1497 public: |
| 1498 virtual ~SkCanvasClipVisitor(); | 1498 virtual ~SkCanvasClipVisitor(); |
| 1499 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1499 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1500 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1500 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1501 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1501 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1502 }; | 1502 }; |
| 1503 | 1503 |
| 1504 #endif | 1504 #endif |
| OLD | NEW |