Chromium Code Reviews| Index: include/core/SkCanvas.h |
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
| index ec14829ca85296d12d79d27a04073c6ee587c20e..5535261449020c2c0ecc45ec9f056fc1c0a543ff 100644 |
| --- a/include/core/SkCanvas.h |
| +++ b/include/core/SkCanvas.h |
| @@ -444,6 +444,13 @@ 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); |
|
reed1
2016/07/12 22:58:03
As documented, this "sets" the z value. That diffe
jvanverth1
2016/07/13 12:14:33
The method name is correct; the comment is decepti
|
| + |
| /** |
| * Modify the current clip with the specified rectangle. |
| * @param rect The rect to combine with the current clip |
| @@ -1245,6 +1252,10 @@ public: |
| void temporary_internal_describeTopLayer(SkMatrix* matrix, SkIRect* clip_bounds); |
| protected: |
| + /** Returns the current (cumulative) draw depth of the canvas. |
| + */ |
| + SkScalar getZ() const; |
| + |
| /** After calling saveLayer(), there can be any number of devices that make |
| up the top-most drawing area. LayerIter can be used to iterate through |
| those devices. Note that the iterator is only valid until the next API |
| @@ -1307,6 +1318,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&); |