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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 the canvas (or the previous layer). | 325 the canvas (or the previous layer). |
326 @param bounds (may be null) This rect, if non-null, is used as a hint to | 326 @param bounds (may be null) This rect, if non-null, is used as a hint to |
327 limit the size of the offscreen, and thus drawing may be | 327 limit the size of the offscreen, and thus drawing may be |
328 clipped to it, though that clipping is not guaranteed to | 328 clipped to it, though that clipping is not guaranteed to |
329 happen. If exact clipping is desired, use clipRect(). | 329 happen. If exact clipping is desired, use clipRect(). |
330 @param paint (may be null) This is copied, and is applied to the | 330 @param paint (may be null) This is copied, and is applied to the |
331 offscreen when restore() is called | 331 offscreen when restore() is called |
332 @return The value to pass to restoreToCount() to balance this save() | 332 @return The value to pass to restoreToCount() to balance this save() |
333 */ | 333 */ |
334 int saveLayer(const SkRect* bounds, const SkPaint* paint); | 334 int saveLayer(const SkRect* bounds, const SkPaint* paint); |
| 335 int saveLayer(const SkRect& bounds, const SkPaint* paint) { |
| 336 return this->saveLayer(&bounds, paint); |
| 337 } |
335 | 338 |
336 /** DEPRECATED - use saveLayer(const SkRect*, const SkPaint*) instead. | 339 /** DEPRECATED - use saveLayer(const SkRect*, const SkPaint*) instead. |
337 | 340 |
338 This behaves the same as saveLayer(const SkRect*, const SkPaint*), | 341 This behaves the same as saveLayer(const SkRect*, const SkPaint*), |
339 but it allows fine-grained control of which state bits to be saved | 342 but it allows fine-grained control of which state bits to be saved |
340 (and subsequently restored). | 343 (and subsequently restored). |
341 | 344 |
342 @param bounds (may be null) This rect, if non-null, is used as a hint to | 345 @param bounds (may be null) This rect, if non-null, is used as a hint to |
343 limit the size of the offscreen, and thus drawing may be | 346 limit the size of the offscreen, and thus drawing may be |
344 clipped to it, though that clipping is not guaranteed to | 347 clipped to it, though that clipping is not guaranteed to |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 | 1565 |
1563 class SkCanvasClipVisitor { | 1566 class SkCanvasClipVisitor { |
1564 public: | 1567 public: |
1565 virtual ~SkCanvasClipVisitor(); | 1568 virtual ~SkCanvasClipVisitor(); |
1566 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1569 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1567 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1570 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1568 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1571 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1569 }; | 1572 }; |
1570 | 1573 |
1571 #endif | 1574 #endif |
OLD | NEW |