Chromium Code Reviews| Index: include/core/SkCanvas.h |
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
| index ec14829ca85296d12d79d27a04073c6ee587c20e..3f399a8234beafec6b6ca27f0b3fa97eb03ccd37 100644 |
| --- a/include/core/SkCanvas.h |
| +++ b/include/core/SkCanvas.h |
| @@ -444,6 +444,19 @@ public: |
| */ |
| void resetMatrix(); |
| + /** Set the current draw depth of the canvas. |
| + @param z The SkScalar depth; it's tracked in the save/restore stack. |
| + Negative into screen, positive out of screen. |
| + Defaults to 0. |
| + */ |
| + void translateZ(SkScalar z); |
| + |
| +protected: |
|
bsalomon
2016/07/12 15:26:34
We usually try to just have one public, protected
robertphillips
2016/07/12 15:34:32
add the word "cumulative" somewhere here ?
vjiaoblack
2016/07/12 16:03:33
Sure, but I think that's redundant!
|
| + /** Returns the current draw depth of the canvas. |
| + */ |
| + SkScalar getZ() const; |
| +public: |
| + |
| /** |
| * Modify the current clip with the specified rectangle. |
| * @param rect The rect to combine with the current clip |
| @@ -1307,6 +1320,7 @@ protected: |
| virtual void didRestore() {} |
| virtual void didConcat(const SkMatrix&) {} |
| virtual void didSetMatrix(const SkMatrix&) {} |
| + virtual void didTranslateZ(SkScalar) {} |
| virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value); |
| virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); |