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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 int getSaveCount() const; | 391 int getSaveCount() const; |
392 | 392 |
393 /** Efficient way to pop any calls to save() that happened after the save | 393 /** Efficient way to pop any calls to save() that happened after the save |
394 count reached saveCount. It is an error for saveCount to be greater than | 394 count reached saveCount. It is an error for saveCount to be greater than |
395 getSaveCount(). To pop all the way back to the initial matrix/clip conte
xt | 395 getSaveCount(). To pop all the way back to the initial matrix/clip conte
xt |
396 pass saveCount == 1. | 396 pass saveCount == 1. |
397 @param saveCount The number of save() levels to restore from | 397 @param saveCount The number of save() levels to restore from |
398 */ | 398 */ |
399 void restoreToCount(int saveCount); | 399 void restoreToCount(int saveCount); |
400 | 400 |
401 /** Returns true if drawing is currently going to a layer (from saveLayer) | |
402 * rather than to the root device. | |
403 */ | |
404 virtual bool isDrawingToLayer() const; | |
405 | |
406 /** Preconcat the current matrix with the specified translation | 401 /** Preconcat the current matrix with the specified translation |
407 @param dx The distance to translate in X | 402 @param dx The distance to translate in X |
408 @param dy The distance to translate in Y | 403 @param dy The distance to translate in Y |
409 */ | 404 */ |
410 void translate(SkScalar dx, SkScalar dy); | 405 void translate(SkScalar dx, SkScalar dy); |
411 | 406 |
412 /** Preconcat the current matrix with the specified scale. | 407 /** Preconcat the current matrix with the specified scale. |
413 @param sx The amount to scale in X | 408 @param sx The amount to scale in X |
414 @param sy The amount to scale in Y | 409 @param sy The amount to scale in Y |
415 */ | 410 */ |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 | 1486 |
1492 class SkCanvasClipVisitor { | 1487 class SkCanvasClipVisitor { |
1493 public: | 1488 public: |
1494 virtual ~SkCanvasClipVisitor(); | 1489 virtual ~SkCanvasClipVisitor(); |
1495 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1490 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1496 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1491 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1497 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1492 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1498 }; | 1493 }; |
1499 | 1494 |
1500 #endif | 1495 #endif |
OLD | NEW |