Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index bd9b1d7f7e79ae93ca1f6d66fda0053a15e7b27d..aa6b521887a04e1a9dbb109315376d1f2ef98863 100644 |
--- a/src/pdf/SkPDFDevice.cpp |
+++ b/src/pdf/SkPDFDevice.cpp |
@@ -1144,8 +1144,8 @@ |
} |
void SkPDFDevice::drawPosText(const SkDraw& d, const void* text, size_t len, |
- const SkScalar pos[], int scalarsPerPos, |
- const SkPoint& offset, const SkPaint& paint) { |
+ const SkScalar pos[], SkScalar constY, |
+ int scalarsPerPos, const SkPaint& paint) { |
NOT_IMPLEMENTED(paint.getMaskFilter() != NULL, false); |
if (paint.getMaskFilter() != NULL) { |
// Don't pretend we support drawing MaskFilters, it makes for artifacts |
@@ -1177,9 +1177,8 @@ |
continue; |
} |
fFontGlyphUsage->noteGlyphUsage(font, &encodedValue, 1); |
- SkScalar x = offset.x() + pos[i * scalarsPerPos]; |
- SkScalar y = offset.y() + (2 == scalarsPerPos ? pos[i * scalarsPerPos + 1] : 0); |
- |
+ SkScalar x = pos[i * scalarsPerPos]; |
+ SkScalar y = scalarsPerPos == 1 ? constY : pos[i * scalarsPerPos + 1]; |
align_text(glyphCacheProc, textPaint, glyphIDs + i, 1, &x, &y); |
set_text_transform(x, y, textPaint.getTextSkewX(), |
&content.entry()->fContent); |