Lines Matching full:matrix
73 SkAutoBlitterChoose(const SkBitmap& device, const SkMatrix& matrix,
75 fBlitter = SkBlitter::Choose(device, matrix, paint,
328 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 SkRegion* clip) {
461 matrix->rectStaysRect() && SkCanvas::kPoints_PointMode == mode) {
462 SkScalar sx = matrix->get(SkMatrix::kMScaleX);
463 SkScalar sy = matrix->get(SkMatrix::kMScaleY);
524 const SkPaint& paint, const SkMatrix& matrix) {
531 matrix.mapRect(&bounds);
578 const SkMatrix* matrix = fMatrix;
589 matrix->mapPoints(devPts, pts, n);
679 const SkMatrix& matrix = *fMatrix;
684 matrix.mapXY(rect.fLeft, rect.fTop, rect_points(devRect, 0));
685 matrix.mapXY(rect.fRight, rect.fBottom, rect_points(devRect, 1));
705 SkAutoBlitterChoose blitterStorage(*fBitmap, matrix, paint);
782 static bool map_radius(const SkMatrix& matrix, SkScalar* value) {
783 if (matrix.getType() & SkMatrix::kPerspective_Mask) {
789 matrix.mapVectors(dst, src, 2);
813 const SkMatrix* matrix = fMatrix;
827 if (!tmpMatrix.setConcat(*matrix, *prePathMatrix)) {
831 matrix = &tmpMatrix;
846 // hairline? Only if the matrix scales evenly in X and Y, and the device-width is
850 if (width > 0 && map_radius(*matrix, &width)) {
867 if (paint.getRasterizer()->rasterize(*pathPtr, *matrix,
880 pathPtr->transform(*matrix, devPathPtr);
910 /** For the purposes of drawing bitmaps, if a matrix is "almost" translate
913 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
914 SkMatrix::TypeMask mask = matrix.getType();
920 SkScalar sx = matrix[SkMatrix::kMScaleX];
921 SkScalar sy = matrix[SkMatrix::kMScaleY];
980 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1017 static bool clipped_out(const SkMatrix& matrix, const SkRegion& clip,
1021 return clipped_out(matrix, clip, r);
1043 SkMatrix matrix;
1044 if (!matrix.setConcat(*fMatrix, prematrix)) {
1048 if (clipped_out(matrix, *fClip, bitmap.width(), bitmap.height())) {
1052 if (fBounder && just_translate(matrix, bitmap)) {
1054 int32_t ix = SkScalarRound(matrix.getTranslateX());
1055 int32_t iy = SkScalarRound(matrix.getTranslateY());
1070 just_translate(matrix, bitmap)) {
1071 int ix = SkScalarRound(matrix.getTranslateX());
1072 int iy = SkScalarRound(matrix.getTranslateY());
1101 draw.fMatrix = &matrix;
1162 SkMatrix matrix;
1169 matrix.setTranslate(r.fLeft, r.fTop);
1170 paint.getShader()->setLocalMatrix(matrix);
1173 matrix.reset();
1174 draw.fMatrix = &matrix;
1213 SkMatrix matrix;
1214 matrix.setScale(iter.getPathScale(), iter.getPathScale());
1215 matrix.postTranslate(x, y);
1221 matrix.postTranslate(xpos - prevXPos, 0);
1222 this->drawPath(*iterPath, iter.getPaint(), &matrix, false);
1580 TextMapState(const SkMatrix& matrix, SkScalar y)
1581 : fMatrix(matrix), fProc(matrix.getMapXYProc()), fY(y) {}
1757 SkPathMeasure& meas, const SkMatrix& matrix) {
1758 SkMatrix::MapXYProc proc = matrix.getMapXYProc();
1764 proc(matrix, src[i].fX, src[i].fY, &pos);
1771 SkMatrix matrix;
1775 matrix.setSinCos(tangent.fY, tangent.fX);
1776 matrix.preTranslate(-sx, 0);
1777 matrix.postTranslate(pos.fX, pos.fY);
1778 matrix.mapPoints(&dst[i], &pt, 1);
1792 const SkMatrix& matrix) {
1800 morphpoints(dstP, srcP, 1, meas, matrix);
1807 morphpoints(dstP, srcP, 2, meas, matrix);
1811 morphpoints(dstP, &srcP[1], 2, meas, matrix);
1815 morphpoints(dstP, &srcP[1], 3, meas, matrix);
1829 const SkPath& follow, const SkMatrix* matrix,
1865 if (matrix) {
1866 m.postConcat(*matrix);
1875 const SkPath& path, const SkMatrix* matrix) const {
1922 if (matrix) {
1923 m.postConcat(*matrix);
2072 const SkPoint texs[], SkMatrix* matrix) {
2081 return matrix->setPolyToPoly(src, dst, 3);
2261 // need to recal setContext since we changed the local matrix
2276 // now restore the shader's original local matrix
2466 SkMatrix matrix;
2473 matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
2478 draw.fMatrix = &matrix;