| Index: src/core/SkDraw.cpp
|
| diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
|
| index e905f4b9f561b6ff31d19589feee333aa9d8af7f..929088df17d25f206cab35fbc7b5ac240fba7411 100644
|
| --- a/src/core/SkDraw.cpp
|
| +++ b/src/core/SkDraw.cpp
|
| @@ -1655,9 +1655,8 @@ void SkDraw::drawText(const char text[], size_t byteLength,
|
| //////////////////////////////////////////////////////////////////////////////
|
|
|
| void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
|
| - const SkScalar pos[], SkScalar constY,
|
| - int scalarsPerPosition,
|
| - const SkPaint& origPaint) const {
|
| + const SkScalar pos[], int scalarsPerPosition,
|
| + const SkPoint& offset, const SkPaint& origPaint) const {
|
| // setup our std paint, in hopes of getting hits in the cache
|
| SkPaint paint(origPaint);
|
| SkScalar matrixScale = paint.setupForAsPaths();
|
| @@ -1675,7 +1674,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
|
|
|
| const char* stop = text + byteLength;
|
| SkTextAlignProcScalar alignProc(paint.getTextAlign());
|
| - SkTextMapStateProc tmsProc(SkMatrix::I(), constY, scalarsPerPosition);
|
| + SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
|
|
|
| // Now restore the original settings, so we "draw" with whatever style/stroking.
|
| paint.setStyle(origPaint.getStyle());
|
| @@ -1705,8 +1704,8 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength,
|
| }
|
|
|
| void SkDraw::drawPosText(const char text[], size_t byteLength,
|
| - const SkScalar pos[], SkScalar constY,
|
| - int scalarsPerPosition, const SkPaint& paint) const {
|
| + const SkScalar pos[], int scalarsPerPosition,
|
| + const SkPoint& offset, const SkPaint& paint) const {
|
| SkASSERT(byteLength == 0 || text != NULL);
|
| SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
|
|
|
| @@ -1718,8 +1717,7 @@ void SkDraw::drawPosText(const char text[], size_t byteLength,
|
| }
|
|
|
| if (ShouldDrawTextAsPaths(paint, *fMatrix)) {
|
| - this->drawPosText_asPaths(text, byteLength, pos, constY,
|
| - scalarsPerPosition, paint);
|
| + this->drawPosText_asPaths(text, byteLength, pos, scalarsPerPosition, offset, paint);
|
| return;
|
| }
|
|
|
| @@ -1743,7 +1741,7 @@ void SkDraw::drawPosText(const char text[], size_t byteLength,
|
| SkTextAlignProc alignProc(paint.getTextAlign());
|
| SkDraw1Glyph d1g;
|
| SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache, paint);
|
| - SkTextMapStateProc tmsProc(*fMatrix, constY, scalarsPerPosition);
|
| + SkTextMapStateProc tmsProc(*fMatrix, offset, scalarsPerPosition);
|
|
|
| if (cache->isSubpixel()) {
|
| // maybe we should skip the rounding if linearText is set
|
|
|