summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_appstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl/cpwl_appstream.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index 203a634bfa..38144d1735 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -129,8 +129,8 @@ ByteString GetColorAppStream(const CFX_Color& color,
}
ByteString GetAP_Check(const CFX_FloatRect& crBBox) {
- const float fWidth = crBBox.right - crBBox.left;
- const float fHeight = crBBox.top - crBBox.bottom;
+ const float fWidth = crBBox.Width();
+ const float fHeight = crBBox.Height();
CFX_PointF pts[8][3] = {{CFX_PointF(0.28f, 0.52f), CFX_PointF(0.27f, 0.48f),
CFX_PointF(0.29f, 0.40f)},
@@ -180,8 +180,8 @@ ByteString GetAP_Check(const CFX_FloatRect& crBBox) {
ByteString GetAP_Circle(const CFX_FloatRect& crBBox) {
std::ostringstream csAP;
- float fWidth = crBBox.right - crBBox.left;
- float fHeight = crBBox.top - crBBox.bottom;
+ float fWidth = crBBox.Width();
+ float fHeight = crBBox.Height();
CFX_PointF pt1(crBBox.left, crBBox.bottom + fHeight / 2);
CFX_PointF pt2(crBBox.left + fWidth / 2, crBBox.top);
@@ -236,8 +236,8 @@ ByteString GetAP_Cross(const CFX_FloatRect& crBBox) {
ByteString GetAP_Diamond(const CFX_FloatRect& crBBox) {
std::ostringstream csAP;
- float fWidth = crBBox.right - crBBox.left;
- float fHeight = crBBox.top - crBBox.bottom;
+ float fWidth = crBBox.Width();
+ float fHeight = crBBox.Height();
CFX_PointF pt1(crBBox.left, crBBox.bottom + fHeight / 2);
CFX_PointF pt2(crBBox.left + fWidth / 2, crBBox.top);
@@ -298,8 +298,8 @@ ByteString GetAP_Star(const CFX_FloatRect& crBBox) {
ByteString GetAP_HalfCircle(const CFX_FloatRect& crBBox, float fRotate) {
std::ostringstream csAP;
- float fWidth = crBBox.right - crBBox.left;
- float fHeight = crBBox.top - crBBox.bottom;
+ float fWidth = crBBox.Width();
+ float fHeight = crBBox.Height();
CFX_PointF pt1(-fWidth / 2, 0);
CFX_PointF pt2(0, fHeight / 2);
@@ -776,7 +776,7 @@ ByteString GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
case ButtonStyle::kIconTopLabelBottom:
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
- fHeight = rcBBox.top - rcBBox.bottom;
+ fHeight = rcBBox.Height();
rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcBBox.right,
rcBBox.bottom + fHeight * fAutoFontScale);
rcIcon =
@@ -800,7 +800,7 @@ ByteString GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
case ButtonStyle::kIconBottomLabelTop:
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
- fHeight = rcBBox.top - rcBBox.bottom;
+ fHeight = rcBBox.Height();
rcLabel =
CFX_FloatRect(rcBBox.left, rcBBox.top - fHeight * fAutoFontScale,
rcBBox.right, rcBBox.top);