Lines Matching refs:matrix

47     SkAutoBlitterChoose(const SkBitmap& device, const SkMatrix& matrix,
49 fBlitter = SkBlitter::Choose(device, matrix, paint, &fAllocator,
56 void choose(const SkBitmap& device, const SkMatrix& matrix,
59 fBlitter = SkBlitter::Choose(device, matrix, paint, &fAllocator,
306 bool init(SkCanvas::PointMode, const SkPaint&, const SkMatrix* matrix,
411 // square procs (strokeWidth > 0 but matrix is square-scale (sx == sy)
449 const SkMatrix* matrix, const SkRasterClip* rc) {
463 matrix->isScaleTranslate() && SkCanvas::kPoints_PointMode == mode) {
464 SkScalar sx = matrix->get(SkMatrix::kMScaleX);
465 SkScalar sy = matrix->get(SkMatrix::kMScaleY);
565 const SkMatrix* matrix = fMatrix;
576 matrix->mapPoints(devPts, pts, n);
738 static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
745 SkASSERT(matrix.rectStaysRect());
747 matrix.mapVectors(strokeSize, &pt, 1);
754 const SkMatrix& matrix,
766 paint.getRasterizer() || !matrix.rectStaysRect() ||
773 } else if (easy_rect_join(paint, matrix, strokeSize)) {
808 const SkMatrix& matrix = *fMatrix;
812 matrix.mapPoints(rect_points(devRect), rect_points(rect), 2);
836 looper.mapMatrix(&localMatrix, matrix);
931 bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix& matrix,
936 if (matrix.hasPerspective()) {
943 matrix.mapVectors(dst, src, 2);
1013 const SkMatrix* matrix = fMatrix;
1027 tmpMatrix.setConcat(*matrix, *prePathMatrix);
1028 matrix = &tmpMatrix;
1038 if (SkDrawTreatAsHairline(origPaint, *matrix, &coverage)) {
1072 if (paint->getRasterizer()->rasterize(*pathPtr, *matrix,
1085 pathPtr->transform(*matrix, devPathPtr);
1121 /** For the purposes of drawing bitmaps, if a matrix is "almost" translate
1124 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
1127 return SkTreatAsSprite(matrix, bitmap.width(), bitmap.height(), bits);
1183 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1219 static bool clipped_out(const SkMatrix& matrix, const SkRasterClip& clip,
1223 return clipped_out(matrix, clip, r);
1246 SkMatrix matrix;
1247 matrix.setConcat(*fMatrix, prematrix);
1249 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) {
1253 if (bitmap.colorType() != kAlpha_8_SkColorType && just_translate(matrix, bitmap)) {
1255 // It is safe to call lock pixels now, since we know the matrix is
1262 int ix = SkScalarRoundToInt(matrix.getTranslateX());
1263 int iy = SkScalarRoundToInt(matrix.getTranslateY());
1282 draw.fMatrix = &matrix;
1330 SkMatrix matrix;
1337 matrix.setTranslate(r.fLeft, r.fTop);
1338 SkAutoBitmapShaderInstall install(bitmap, paint, &matrix);
1342 matrix.reset();
1343 draw.fMatrix = &matrix;
1398 SkMatrix matrix;
1399 matrix.setScale(iter.getPathScale(), iter.getPathScale());
1400 matrix.postTranslate(x, y);
1406 matrix.postTranslate(xpos - prevXPos, 0);
1410 fDevice->drawPath(*this, *iterPath, pnt, &matrix, false);
1412 this->drawPath(*iterPath, pnt, &matrix, false);
1665 SkMatrix matrix;
1666 matrix.setScale(matrixScale, matrixScale);
1694 matrix[SkMatrix::kMTransX] = loc.fX;
1695 matrix[SkMatrix::kMTransY] = loc.fY;
1697 fDevice->drawPath(*this, *path, paint, &matrix, false);
1699 this->drawPath(*path, paint, &matrix, false);
1859 SkPathMeasure& meas, const SkMatrix& matrix) {
1860 SkMatrix::MapXYProc proc = matrix.getMapXYProc();
1866 proc(matrix, src[i].fX, src[i].fY, &pos);
1876 SkMatrix matrix;
1880 matrix.setSinCos(tangent.fY, tangent.fX);
1881 matrix.preTranslate(-sx, 0);
1882 matrix.postTranslate(pos.fX, pos.fY);
1883 matrix.mapPoints(&dst[i], &pt, 1);
1897 const SkMatrix& matrix) {
1905 morphpoints(dstP, srcP, 1, meas, matrix);
1912 morphpoints(dstP, srcP, 2, meas, matrix);
1916 morphpoints(dstP, &srcP[1], 2, meas, matrix);
1920 morphpoints(dstP, &srcP[1], 3, meas, matrix);
1934 const SkPath& follow, const SkMatrix* matrix,
1969 if (matrix) {
1970 m.postConcat(*matrix);
1992 const SkPoint texs[], SkMatrix* matrix) {
2001 return matrix->setPolyToPoly(src, dst, 3);
2342 SkMatrix matrix;
2349 matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
2355 draw.fMatrix = &matrix;