summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-14 10:08:55 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-14 15:11:27 +0000
commitd8b01ca3bd9c21e76443004907ea1bc02fb57b6e (patch)
tree59f80451f15fef9e4e1641e1aa3eb1b592c4010c /core/fxge/apple
parentceb3ab55ca5ad1fae590f50a09f04b7ed47656b1 (diff)
downloadpdfium-d8b01ca3bd9c21e76443004907ea1bc02fb57b6e.tar.xz
Revert "Convert Origins to points"
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11. Reason for revert: Reverting chain to see if fixes Chrome roll. Original change's description: > Convert Origins to points > > This CL converts various OriginX, OriginY pairs into CFX_PointF objects. > > Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844 > Reviewed-on: https://pdfium-review.googlesource.com/2575 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Nicolás Peña <npm@chromium.org> > TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc Reviewed-on: https://pdfium-review.googlesource.com/2696 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_apple_platform.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index 3713450377..d6867384e6 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -39,7 +39,9 @@ bool CGDrawGlyphRun(CGContextRef pContext,
if (bNegSize)
font_size = -font_size;
+ FX_FLOAT ori_x = pCharPos[0].m_OriginX, ori_y = pCharPos[0].m_OriginY;
CFX_Matrix new_matrix;
+ new_matrix.TransformPoint(ori_x, ori_y);
if (pObject2Device)
new_matrix.Concat(*pObject2Device);
@@ -55,20 +57,17 @@ bool CGDrawGlyphRun(CGContextRef pContext,
if (!pFont->GetPlatformFont())
return false;
}
-
CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
for (int i = 0; i < nChars; i++) {
glyph_indices[i] =
pCharPos[i].m_ExtGID ? pCharPos[i].m_ExtGID : pCharPos[i].m_GlyphIndex;
-
if (bNegSize)
- glyph_positions[i].x = -pCharPos[i].m_Origin.x;
+ glyph_positions[i].x = -pCharPos[i].m_OriginX;
else
- glyph_positions[i].x = pCharPos[i].m_Origin.x;
- glyph_positions[i].y = pCharPos[i].m_Origin.y;
+ glyph_positions[i].x = pCharPos[i].m_OriginX;
+ glyph_positions[i].y = pCharPos[i].m_OriginY;
}
-
if (bNegSize) {
new_matrix.a = -new_matrix.a;
new_matrix.c = -new_matrix.c;