void SkDumpCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, const SkPaint* paint) { SkString bs, ms; bitmap.toString(&bs); m.toString(&ms); this->dump(kDrawBitmap_Verb, paint, "drawBitmapMatrix(%s %s)", bs.c_str(), ms.c_str()); }
void SkDumpCanvas::didConcat(const SkMatrix& matrix) { SkString str; switch (matrix.getType()) { case SkMatrix::kTranslate_Mask: this->dump(kMatrix_Verb, nullptr, "translate(%g %g)", SkScalarToFloat(matrix.getTranslateX()), SkScalarToFloat(matrix.getTranslateY())); break; case SkMatrix::kScale_Mask: this->dump(kMatrix_Verb, nullptr, "scale(%g %g)", SkScalarToFloat(matrix.getScaleX()), SkScalarToFloat(matrix.getScaleY())); break; default: matrix.toString(&str); this->dump(kMatrix_Verb, nullptr, "concat(%s)", str.c_str()); break; } this->INHERITED::didConcat(matrix); }
void SkDumpCanvas::didSetMatrix(const SkMatrix& matrix) { SkString str; matrix.toString(&str); this->dump(kMatrix_Verb, nullptr, "setMatrix(%s)", str.c_str()); this->INHERITED::didSetMatrix(matrix); }
bool SkDumpCanvas::concat(const SkMatrix& matrix) { SkString str; matrix.toString(&str); this->dump(kMatrix_Verb, NULL, "concat(%s)", str.c_str()); return this->INHERITED::concat(matrix); }