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);
305 bool init(SkCanvas::PointMode, const SkPaint&, const SkMatrix* matrix,
410 // square procs (strokeWidth > 0 but matrix is square-scale (sx == sy)
448 const SkMatrix* matrix, const SkRasterClip* rc) {
462 matrix->rectStaysRect() && SkCanvas::kPoints_PointMode == mode) {
463 SkScalar sx = matrix->get(SkMatrix::kMScaleX);
464 SkScalar sy = matrix->get(SkMatrix::kMScaleY);
564 const SkMatrix* matrix = fMatrix;
575 matrix->mapPoints(devPts, pts, n);
737 static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
744 SkASSERT(matrix.rectStaysRect());
746 matrix.mapVectors(strokeSize, &pt, 1);
753 const SkMatrix& matrix,
765 paint.getRasterizer() || !matrix.rectStaysRect() ||
772 } else if (easy_rect_join(paint, matrix, strokeSize)) {
807 const SkMatrix& matrix = *fMatrix;
811 matrix.mapPoints(rect_points(devRect), rect_points(rect), 2);
830 looper.mapMatrix(&localMatrix, matrix);
925 bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix& matrix,
930 if (matrix.hasPerspective()) {
937 matrix.mapVectors(dst, src, 2);
1007 const SkMatrix* matrix = fMatrix;
1021 tmpMatrix.setConcat(*matrix, *prePathMatrix);
1022 matrix = &tmpMatrix;
1032 if (SkDrawTreatAsHairline(origPaint, *matrix, &coverage)) {
1066 if (paint->getRasterizer()->rasterize(*pathPtr, *matrix,
1079 pathPtr->transform(*matrix, devPathPtr);
1108 /** For the purposes of drawing bitmaps, if a matrix is "almost" translate
1111 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
1114 return SkTreatAsSprite(matrix, bitmap.width(), bitmap.height(), bits);
1170 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1206 static bool clipped_out(const SkMatrix& matrix, const SkRasterClip& clip,
1210 return clipped_out(matrix, clip, r);
1233 SkMatrix matrix;
1234 matrix.setConcat(*fMatrix, prematrix);
1236 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) {
1240 if (bitmap.colorType() != kAlpha_8_SkColorType && just_translate(matrix, bitmap)) {
1242 // It is safe to call lock pixels now, since we know the matrix is
1249 int ix = SkScalarRoundToInt(matrix.getTranslateX());
1250 int iy = SkScalarRoundToInt(matrix.getTranslateY());
1269 draw.fMatrix = &matrix;
1317 SkMatrix matrix;
1324 matrix.setTranslate(r.fLeft, r.fTop);
1325 SkAutoBitmapShaderInstall install(bitmap, paint, &matrix);
1329 matrix.reset();
1330 draw.fMatrix = &matrix;
1385 SkMatrix matrix;
1386 matrix.setScale(iter.getPathScale(), iter.getPathScale());
1387 matrix.postTranslate(x, y);
1393 matrix.postTranslate(xpos - prevXPos, 0);
1397 fDevice->drawPath(*this, *iterPath, pnt, &matrix, false);
1399 this->drawPath(*iterPath, pnt, &matrix, false);
1652 SkMatrix matrix;
1653 matrix.setScale(matrixScale, matrixScale);
1681 matrix[SkMatrix::kMTransX] = loc.fX;
1682 matrix[SkMatrix::kMTransY] = loc.fY;
1684 fDevice->drawPath(*this, *path, paint, &matrix, false);
1686 this->drawPath(*path, paint, &matrix, false);
1846 SkPathMeasure& meas, const SkMatrix& matrix) {
1847 SkMatrix::MapXYProc proc = matrix.getMapXYProc();
1853 proc(matrix, src[i].fX, src[i].fY, &pos);
1863 SkMatrix matrix;
1867 matrix.setSinCos(tangent.fY, tangent.fX);
1868 matrix.preTranslate(-sx, 0);
1869 matrix.postTranslate(pos.fX, pos.fY);
1870 matrix.mapPoints(&dst[i], &pt, 1);
1884 const SkMatrix& matrix) {
1892 morphpoints(dstP, srcP, 1, meas, matrix);
1899 morphpoints(dstP, srcP, 2, meas, matrix);
1903 morphpoints(dstP, &srcP[1], 2, meas, matrix);
1907 morphpoints(dstP, &srcP[1], 3, meas, matrix);
1921 const SkPath& follow, const SkMatrix* matrix,
1956 if (matrix) {
1957 m.postConcat(*matrix);
1979 const SkPoint texs[], SkMatrix* matrix) {
1988 return matrix->setPolyToPoly(src, dst, 3);
2331 SkMatrix matrix;
2338 matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
2344 draw.fMatrix = &matrix;