Disambiguate CFX_PathData::GetBoundingBox().
Rename one overload to GetBoundingBoxForStrokePath(). Do the same in
CPDF_Path.
Change-Id: I33940cd8e1bd2c4042af57bb6ddf827f743adc47
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/80937
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_path.cpp b/core/fpdfapi/page/cpdf_path.cpp
index aac35e7..bb41699 100644
--- a/core/fpdfapi/page/cpdf_path.cpp
+++ b/core/fpdfapi/page/cpdf_path.cpp
@@ -28,9 +28,10 @@
return m_Ref.GetObject()->GetBoundingBox();
}
-CFX_FloatRect CPDF_Path::GetBoundingBox(float line_width,
- float miter_limit) const {
- return m_Ref.GetObject()->GetBoundingBox(line_width, miter_limit);
+CFX_FloatRect CPDF_Path::GetBoundingBoxForStrokePath(float line_width,
+ float miter_limit) const {
+ return m_Ref.GetObject()->GetBoundingBoxForStrokePath(line_width,
+ miter_limit);
}
bool CPDF_Path::IsRect() const {
diff --git a/core/fpdfapi/page/cpdf_path.h b/core/fpdfapi/page/cpdf_path.h
index 547de09..b2d1437 100644
--- a/core/fpdfapi/page/cpdf_path.h
+++ b/core/fpdfapi/page/cpdf_path.h
@@ -27,7 +27,8 @@
CFX_PointF GetPoint(int index) const;
CFX_FloatRect GetBoundingBox() const;
- CFX_FloatRect GetBoundingBox(float line_width, float miter_limit) const;
+ CFX_FloatRect GetBoundingBoxForStrokePath(float line_width,
+ float miter_limit) const;
bool IsRect() const;
void Transform(const CFX_Matrix& matrix);
diff --git a/core/fpdfapi/page/cpdf_pathobject.cpp b/core/fpdfapi/page/cpdf_pathobject.cpp
index eafbe77..50c9c6e 100644
--- a/core/fpdfapi/page/cpdf_pathobject.cpp
+++ b/core/fpdfapi/page/cpdf_pathobject.cpp
@@ -41,7 +41,8 @@
CFX_FloatRect rect;
float width = m_GraphState.GetLineWidth();
if (m_bStroke && width != 0) {
- rect = m_Path.GetBoundingBox(width, m_GraphState.GetMiterLimit());
+ rect =
+ m_Path.GetBoundingBoxForStrokePath(width, m_GraphState.GetMiterLimit());
} else {
rect = m_Path.GetBoundingBox();
}
diff --git a/core/fxge/cfx_pathdata.cpp b/core/fxge/cfx_pathdata.cpp
index db9b059..7012254 100644
--- a/core/fxge/cfx_pathdata.cpp
+++ b/core/fxge/cfx_pathdata.cpp
@@ -334,8 +334,9 @@
return rect;
}
-CFX_FloatRect CFX_PathData::GetBoundingBox(float line_width,
- float miter_limit) const {
+CFX_FloatRect CFX_PathData::GetBoundingBoxForStrokePath(
+ float line_width,
+ float miter_limit) const {
CFX_FloatRect rect(100000.0f, 100000.0f, -100000.0f, -100000.0f);
size_t iPoint = 0;
float half_width = line_width;
diff --git a/core/fxge/cfx_pathdata.h b/core/fxge/cfx_pathdata.h
index 807687d..ed25c95 100644
--- a/core/fxge/cfx_pathdata.h
+++ b/core/fxge/cfx_pathdata.h
@@ -51,7 +51,8 @@
std::vector<FX_PATHPOINT>& GetPoints() { return m_Points; }
CFX_FloatRect GetBoundingBox() const;
- CFX_FloatRect GetBoundingBox(float line_width, float miter_limit) const;
+ CFX_FloatRect GetBoundingBoxForStrokePath(float line_width,
+ float miter_limit) const;
void Transform(const CFX_Matrix& matrix);
bool IsRect() const;
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index 1641754..b697774 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -754,8 +754,8 @@
return false;
CFX_FloatRect bbox;
if (pGraphState) {
- bbox = pPathData->GetBoundingBox(pGraphState->m_LineWidth,
- pGraphState->m_MiterLimit);
+ bbox = pPathData->GetBoundingBoxForStrokePath(pGraphState->m_LineWidth,
+ pGraphState->m_MiterLimit);
} else {
bbox = pPathData->GetBoundingBox();
}
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index ce8e0e8..48653a5 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -184,8 +184,8 @@
WriteToStream(&buf);
OutputPath(pPathData, nullptr);
- CFX_FloatRect rect = pPathData->GetBoundingBox(pGraphState->m_LineWidth,
- pGraphState->m_MiterLimit);
+ CFX_FloatRect rect = pPathData->GetBoundingBoxForStrokePath(
+ pGraphState->m_LineWidth, pGraphState->m_MiterLimit);
m_ClipBox.Intersect(pObject2Device->TransformRect(rect).GetOuterRect());
m_pStream->WriteString("strokepath W n sm\n");