Home | History | Annotate | Download | only in core

Lines Matching defs:matrix

50     SkAutoBlitterChoose(const SkBitmap& device, const SkMatrix& matrix,
52 fBlitter = SkBlitter::Choose(device, matrix, paint,
61 void choose(const SkBitmap& device, const SkMatrix& matrix,
64 fBlitter = SkBlitter::Choose(device, matrix, paint,
309 bool init(SkCanvas::PointMode, const SkPaint&, const SkMatrix* matrix,
391 // square procs (strokeWidth > 0 but matrix is square-scale (sx == sy)
429 const SkMatrix* matrix, const SkRegion* clip) {
442 matrix->rectStaysRect() && SkCanvas::kPoints_PointMode == mode) {
443 SkScalar sx = matrix->get(SkMatrix::kMScaleX);
444 SkScalar sy = matrix->get(SkMatrix::kMScaleY);
505 const SkPaint& paint, const SkMatrix& matrix) {
512 matrix.mapRect(&bounds);
561 const SkMatrix* matrix = fMatrix;
572 matrix->mapPoints(devPts, pts, n);
656 static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
663 SkASSERT(matrix.rectStaysRect());
665 matrix.mapVectors(strokeSize, &pt, 1);
672 const SkMatrix& matrix,
684 paint.getRasterizer() || !matrix.rectStaysRect() ||
691 } else if (easy_rect_join(paint, matrix, strokeSize)) {
730 const SkMatrix& matrix = *fMatrix;
735 matrix.mapXY(rect.fLeft, rect.fTop, rect_points(devRect, 0));
736 matrix.mapXY(rect.fRight, rect.fBottom, rect_points(devRect, 1));
756 SkAutoBlitterChoose blitterStorage(*fBitmap, matrix, paint);
845 static bool map_radius(const SkMatrix& matrix, SkScalar* value) {
846 if (matrix.hasPerspective()) {
852 matrix.mapVectors(dst, src, 2);
876 const SkMatrix* matrix = fMatrix;
890 if (!tmpMatrix.setConcat(*matrix, *prePathMatrix)) {
894 matrix = &tmpMatrix;
909 // hairline? Only if the matrix scales evenly in X and Y, and the device-width is
914 if (width > 0 && map_radius(*matrix, &width)) {
931 if (paint.getRasterizer()->rasterize(*pathPtr, *matrix,
944 pathPtr->transform(*matrix, devPathPtr);
974 /** For the purposes of drawing bitmaps, if a matrix is "almost" translate
977 static bool just_translate(const SkMatrix& matrix, const SkBitmap& bitmap) {
978 SkMatrix::TypeMask mask = matrix.getType();
984 SkScalar sx = matrix[SkMatrix::kMScaleX];
985 SkScalar sy = matrix[SkMatrix::kMScaleY];
1044 // now draw our bitmap(src) into mask(dst), transformed by the matrix
1081 static bool clipped_out(const SkMatrix& matrix, const SkRegion& clip,
1085 return clipped_out(matrix, clip, r);
1110 SkMatrix matrix;
1111 if (!matrix.setConcat(*fMatrix, prematrix)) {
1115 if (clipped_out(matrix, *fClip, bitmap.width(), bitmap.height())) {
1119 if (fBounder && just_translate(matrix, bitmap)) {
1121 int32_t ix = SkScalarRound(matrix.getTranslateX());
1122 int32_t iy = SkScalarRound(matrix.getTranslateY());
1137 just_translate(matrix, bitmap)) {
1138 int ix = SkScalarRound(matrix.getTranslateX());
1139 int iy = SkScalarRound(matrix.getTranslateY());
1168 draw.fMatrix = &matrix;
1231 SkMatrix matrix;
1238 matrix.setTranslate(r.fLeft, r.fTop);
1239 shaderPaint.getShader()->setLocalMatrix(matrix);
1242 matrix.reset();
1243 draw.fMatrix = &matrix;
1282 SkMatrix matrix;
1283 matrix.setScale(iter.getPathScale(), iter.getPathScale());
1284 matrix.postTranslate(x, y);
1290 matrix.postTranslate(xpos - prevXPos, 0);
1293 fDevice->drawPath(*this, *iterPath, pnt, &matrix, false);
1295 this->drawPath(*iterPath, pnt, &matrix, false);
1563 const SkMatrix* matrix = fMatrix;
1569 matrix = fMVMatrix;
1574 SkAutoGlyphCache autoCache(paint, matrix);
1580 matrix->mapXY(x, y, &loc);
1609 RoundBaseline roundBaseline = computeRoundBaseline(*matrix);
1624 blitter.choose(*fBitmap, *matrix, paint);
1685 TextMapState(const SkMatrix& matrix, SkScalar y)
1686 : fMatrix(matrix), fProc(matrix.getMapXYProc()), fY(y) {}
1763 const SkMatrix* matrix = fMatrix;
1768 matrix = fMVMatrix;
1773 SkAutoGlyphCache autoCache(paint, matrix);
1778 blitter.choose(*fBitmap, *matrix, paint);
1785 TextMapState tms(*matrix, constY);
1790 RoundBaseline roundBaseline = computeRoundBaseline(*matrix);
1881 SkPathMeasure& meas, const SkMatrix& matrix) {
1882 SkMatrix::MapXYProc proc = matrix.getMapXYProc();
1888 proc(matrix, src[i].fX, src[i].fY, &pos);
1895 SkMatrix matrix;
1899 matrix.setSinCos(tangent.fY, tangent.fX);
1900 matrix.preTranslate(-sx, 0);
1901 matrix.postTranslate(pos.fX, pos.fY);
1902 matrix.mapPoints(&dst[i], &pt, 1);
1916 const SkMatrix& matrix) {
1924 morphpoints(dstP, srcP, 1, meas, matrix);
1931 morphpoints(dstP, srcP, 2, meas, matrix);
1935 morphpoints(dstP, &srcP[1], 2, meas, matrix);
1939 morphpoints(dstP, &srcP[1], 3, meas, matrix);
1953 const SkPath& follow, const SkMatrix* matrix,
1989 if (matrix) {
1990 m.postConcat(*matrix);
2004 const SkPath& path, const SkMatrix* matrix) const {
2051 if (matrix) {
2052 m.postConcat(*matrix);
2202 const SkPoint texs[], SkMatrix* matrix) {
2211 return matrix->setPolyToPoly(src, dst, 3);
2391 // need to recal setContext since we changed the local matrix
2406 // now restore the shader's original local matrix
2604 SkMatrix matrix;
2611 matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
2616 draw.fMatrix = &matrix;