diff options
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/page/cpdf_meshstream.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp index fbbd22276f..75069cab7f 100644 --- a/core/fpdfapi/page/cpdf_meshstream.cpp +++ b/core/fpdfapi/page/cpdf_meshstream.cpp @@ -214,8 +214,7 @@ CPDF_MeshVertex CPDF_MeshStream::ReadVertex(const CFX_Matrix& pObject2Bitmap, *flag = ReadFlag(); CPDF_MeshVertex vertex; - vertex.position = ReadCoords(); - pObject2Bitmap.TransformPoint(vertex.position.x, vertex.position.y); + vertex.position = pObject2Bitmap.Transform(ReadCoords()); std::tie(vertex.r, vertex.g, vertex.b) = ReadColor(); m_BitStream.ByteAlign(); @@ -229,8 +228,7 @@ bool CPDF_MeshStream::ReadVertexRow(const CFX_Matrix& pObject2Bitmap, if (m_BitStream.IsEOF()) return false; - vertex[i].position = ReadCoords(); - pObject2Bitmap.TransformPoint(vertex[i].position.x, vertex[i].position.y); + vertex[i].position = pObject2Bitmap.Transform(ReadCoords()); std::tie(vertex[i].r, vertex[i].g, vertex[i].b) = ReadColor(); m_BitStream.ByteAlign(); } diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 5a340cd8b1..b041a72662 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -2228,13 +2228,11 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, for (int col = min_col; col <= max_col; col++) for (int row = min_row; row <= max_row; row++) { - FX_FLOAT orig_x, orig_y; - orig_x = col * pPattern->x_step(); - orig_y = row * pPattern->y_step(); - mtPattern2Device.TransformPoint(orig_x, orig_y); + CFX_PointF original = mtPattern2Device.Transform( + CFX_PointF(col * pPattern->x_step(), row * pPattern->y_step())); CFX_Matrix matrix = *pObj2Device; - matrix.Translate(orig_x - mtPattern2Device.e, - orig_y - mtPattern2Device.f); + matrix.Translate(original.x - mtPattern2Device.e, + original.y - mtPattern2Device.f); m_pDevice->SaveState(); CPDF_RenderStatus status; status.Initialize(m_pContext, m_pDevice, nullptr, nullptr, this, |