summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp10
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp3
-rw-r--r--core/src/fxcrt/fx_basic_coords.cpp24
3 files changed, 5 insertions, 32 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 4ad6f81d5e..cc9a998e57 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -768,11 +768,7 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
for (int i = 1; i < 13; i++) {
pPoints[i].m_Flag = FXPT_BEZIERTO;
}
- CFX_FloatPoint coords[16];
- for (int i = 0; i < 16; i++) {
- coords[i].Set(0.0f, 0.0f);
- }
-
+ CFX_PointF coords[16];
int point_count = bTensor ? 16 : 12;
while (!stream.m_BitStream.IsEOF()) {
FX_DWORD flag = stream.GetFlag();
@@ -780,11 +776,11 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
if (flag) {
iStartPoint = 4;
iStartColor = 2;
- CFX_FloatPoint tempCoords[4];
+ CFX_PointF tempCoords[4];
for (i = 0; i < 4; i++) {
tempCoords[i] = coords[(flag * 3 + i) % 12];
}
- FXSYS_memcpy(coords, tempCoords, sizeof(CFX_FloatPoint) * 4);
+ FXSYS_memcpy(coords, tempCoords, sizeof(tempCoords));
Coon_Color tempColors[2];
tempColors[0] = patch.patch_colors[flag];
tempColors[1] = patch.patch_colors[(flag + 1) % 4];
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 7858fa0bf6..8e2eae1251 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -1552,8 +1552,7 @@ int32_t CPDF_TextPage::GetTextObjectWritingMode(
if (dX <= 0.0001f && dY <= 0.0001f) {
return -1;
}
- CFX_VectorF v;
- v.Set(dX, dY);
+ CFX_VectorF v(dX, dY);
v.Normalize();
if (v.y <= 0.0872f) {
return v.x <= 0.0872f ? m_TextlineDir : 0;
diff --git a/core/src/fxcrt/fx_basic_coords.cpp b/core/src/fxcrt/fx_basic_coords.cpp
index 814fa36347..27feb55113 100644
--- a/core/src/fxcrt/fx_basic_coords.cpp
+++ b/core/src/fxcrt/fx_basic_coords.cpp
@@ -217,8 +217,7 @@ void CFX_FloatRect::UpdateRect(FX_FLOAT x, FX_FLOAT y) {
top = y;
}
}
-CFX_FloatRect CFX_FloatRect::GetBBox(const CFX_FloatPoint* pPoints,
- int nPoints) {
+CFX_FloatRect CFX_FloatRect::GetBBox(const CFX_PointF* pPoints, int nPoints) {
if (nPoints == 0) {
return CFX_FloatRect();
}
@@ -454,27 +453,6 @@ void CFX_Matrix::TransformVector(CFX_Vector& v) const {
v.x = FXSYS_round(fx);
v.y = FXSYS_round(fy);
}
-void CFX_Matrix::TransformPoints(CFX_Point* points, int32_t iCount) const {
- FXSYS_assert(iCount > 0);
- FX_FLOAT fx, fy;
- for (int32_t i = 0; i < iCount; i++) {
- fx = a * points->x + c * points->y + e;
- fy = b * points->x + d * points->y + f;
- points->x = FXSYS_round(fx);
- points->y = FXSYS_round(fy);
- points++;
- }
-}
-void CFX_Matrix::TransformPoints(CFX_PointF* points, int32_t iCount) const {
- FXSYS_assert(iCount > 0);
- FX_FLOAT fx, fy;
- for (int32_t i = 0; i < iCount; i++) {
- fx = a * points->x + c * points->y + e;
- fy = b * points->x + d * points->y + f;
- points->x = fx, points->y = fy;
- points++;
- }
-}
void CFX_Matrix::TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const {
FX_FLOAT fx = a * x + c * y + e;
FX_FLOAT fy = b * x + d * y + f;