diff options
author | robertphillips <robertphillips@google.com> | 2015-01-26 06:08:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-26 06:08:52 -0800 |
commit | 42dbfa8651861f2f686879c996aab9f9f82277dd (patch) | |
tree | 6a0299231aff19870a0e8a5822ba1d86b816f624 /src/effects/Sk2DPathEffect.cpp | |
parent | b644e9afde5c456a731ec44d8f72b2e1d93b863f (diff) |
Add patheffects to debugger printout
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/872043002
Diffstat (limited to 'src/effects/Sk2DPathEffect.cpp')
-rw-r--r-- | src/effects/Sk2DPathEffect.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 2ad202ae85..1df69a51fc 100644 --- a/src/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp @@ -73,6 +73,15 @@ void Sk2DPathEffect::flatten(SkWriteBuffer& buffer) const { buffer.writeMatrix(fMatrix); } +#ifndef SK_IGNORE_TO_STRING +void Sk2DPathEffect::toString(SkString* str) const { + str->appendf("(matrix: %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f)", + fMatrix[SkMatrix::kMScaleX], fMatrix[SkMatrix::kMSkewX], fMatrix[SkMatrix::kMTransX], + fMatrix[SkMatrix::kMSkewY], fMatrix[SkMatrix::kMScaleY], fMatrix[SkMatrix::kMTransY], + fMatrix[SkMatrix::kMPersp0], fMatrix[SkMatrix::kMPersp1], fMatrix[SkMatrix::kMPersp2]); +} +#endif + /////////////////////////////////////////////////////////////////////////////// bool SkLine2DPathEffect::filterPath(SkPath* dst, const SkPath& src, @@ -109,6 +118,16 @@ void SkLine2DPathEffect::flatten(SkWriteBuffer &buffer) const { buffer.writeScalar(fWidth); } + +#ifndef SK_IGNORE_TO_STRING +void SkLine2DPathEffect::toString(SkString* str) const { + str->appendf("SkLine2DPathEffect: ("); + this->INHERITED::toString(str); + str->appendf("width: %f", fWidth); + str->appendf(")"); +} +#endif + /////////////////////////////////////////////////////////////////////////////// SkPath2DPathEffect::SkPath2DPathEffect(const SkMatrix& m, const SkPath& p) @@ -132,3 +151,12 @@ void SkPath2DPathEffect::next(const SkPoint& loc, int u, int v, SkPath* dst) const { dst->addPath(fPath, loc.fX, loc.fY); } + +#ifndef SK_IGNORE_TO_STRING +void SkPath2DPathEffect::toString(SkString* str) const { + str->appendf("SkPath2DPathEffect: ("); + this->INHERITED::toString(str); + // TODO: print out path information + str->appendf(")"); +} +#endif |