Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Unified Diff: src/effects/Sk2DPathEffect.cpp

Issue 872043002: Add patheffects to debugger printout (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix merge conflict Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/Sk1DPathEffect.cpp ('k') | src/effects/SkArcToPathEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/Sk2DPathEffect.cpp
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp
index 2ad202ae85d772acb875e1c9e579b6ebe26a8f18..1df69a51fc4b95fda7cb8d5e3c382524e6eee675 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
« no previous file with comments | « src/effects/Sk1DPathEffect.cpp ('k') | src/effects/SkArcToPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698