summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-14 14:43:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 19:05:58 +0000
commit05df075154a832fcb476e1dfcfb865722d0ea898 (patch)
treeb8b771b62adae74d5d5ee561db75d10de3a848bf /xfa/fwl
parent6b94f01d1c8ad386d497428c7397b1a99614aeba (diff)
downloadpdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_checkbox.cpp4
-rw-r--r--xfa/fwl/cfwl_checkbox.h4
-rw-r--r--xfa/fwl/cfwl_combobox.cpp14
-rw-r--r--xfa/fwl/cfwl_datetimepicker.cpp6
-rw-r--r--xfa/fwl/cfwl_datetimepicker.h2
-rw-r--r--xfa/fwl/cfwl_edit.cpp78
-rw-r--r--xfa/fwl/cfwl_edit.h18
-rw-r--r--xfa/fwl/cfwl_eventscroll.h2
-rw-r--r--xfa/fwl/cfwl_form.cpp4
-rw-r--r--xfa/fwl/cfwl_form.h4
-rw-r--r--xfa/fwl/cfwl_listbox.cpp39
-rw-r--r--xfa/fwl/cfwl_listbox.h18
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp24
-rw-r--r--xfa/fwl/cfwl_scrollbar.cpp33
-rw-r--r--xfa/fwl/cfwl_scrollbar.h40
-rw-r--r--xfa/fwl/cfwl_widget.cpp37
-rw-r--r--xfa/fwl/cfwl_widget.h18
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp8
-rw-r--r--xfa/fwl/cfwl_widgetmgr.h4
-rw-r--r--xfa/fwl/cfx_barcode.cpp2
-rw-r--r--xfa/fwl/cfx_barcode.h2
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.cpp32
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.h2
-rw-r--r--xfa/fwl/theme/cfwl_edittp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp24
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp22
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h8
28 files changed, 227 insertions, 230 deletions
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index ca31094fe6..c1ca3296b9 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -47,7 +47,7 @@ FWL_Type CFWL_CheckBox::GetClassID() const {
return FWL_Type::CheckBox;
}
-void CFWL_CheckBox::SetBoxSize(FX_FLOAT fHeight) {
+void CFWL_CheckBox::SetBoxSize(float fHeight) {
m_fBoxHeight = fHeight;
}
@@ -129,7 +129,7 @@ void CFWL_CheckBox::Layout() {
FXSYS_round(m_pProperties->m_rtWidget.height);
m_rtClient = GetClientRect();
- FX_FLOAT fTextLeft = m_rtClient.left + m_fBoxHeight;
+ float fTextLeft = m_rtClient.left + m_fBoxHeight;
m_rtBox = CFX_RectF(m_rtClient.TopLeft(), m_fBoxHeight, m_fBoxHeight);
m_rtCaption = CFX_RectF(fTextLeft, m_rtClient.top,
m_rtClient.right() - fTextLeft, m_rtClient.height);
diff --git a/xfa/fwl/cfwl_checkbox.h b/xfa/fwl/cfwl_checkbox.h
index 6df7440894..2f434f23cf 100644
--- a/xfa/fwl/cfwl_checkbox.h
+++ b/xfa/fwl/cfwl_checkbox.h
@@ -47,7 +47,7 @@ class CFWL_CheckBox : public CFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- void SetBoxSize(FX_FLOAT fHeight);
+ void SetBoxSize(float fHeight);
private:
void SetCheckState(int32_t iCheck);
@@ -69,7 +69,7 @@ class CFWL_CheckBox : public CFWL_Widget {
uint32_t m_dwTTOStyles;
int32_t m_iTTOAlign;
bool m_bBtnDown;
- FX_FLOAT m_fBoxHeight;
+ float m_fBoxHeight;
};
#endif // XFA_FWL_CFWL_CHECKBOX_H_
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 6083943f94..61c363c95b 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -376,7 +376,7 @@ void CFWL_ComboBox::Layout() {
if (!theme)
return;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float fBtn = theme->GetScrollBarWidth();
m_rtBtn = CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top, fBtn,
m_rtClient.height);
if (!IsDropDownStyle() || !m_pEdit)
@@ -543,13 +543,13 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
ResetListItemAlignment();
pComboList->ChangeSelected(m_iCurSel);
- FX_FLOAT fItemHeight = pComboList->CalcItemHeight();
- FX_FLOAT fBorder = GetBorderSize(true);
- FX_FLOAT fPopupMin = 0.0f;
+ float fItemHeight = pComboList->CalcItemHeight();
+ float fBorder = GetBorderSize(true);
+ float fPopupMin = 0.0f;
if (iItems > 3)
fPopupMin = fItemHeight * 3 + fBorder * 2;
- FX_FLOAT fPopupMax = fItemHeight * iItems + fBorder * 2;
+ float fPopupMax = fItemHeight * iItems + fBorder * 2;
CFX_RectF rtList(m_rtClient.left, 0, m_pProperties->m_rtWidget.width, 0);
GetPopupPos(fPopupMin, fPopupMax, m_pProperties->m_rtWidget, rtList);
@@ -666,8 +666,8 @@ void CFWL_ComboBox::DisForm_Layout() {
if (!theme)
return;
- FX_FLOAT borderWidth = 1;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float borderWidth = 1;
+ float fBtn = theme->GetScrollBarWidth();
if (!(GetStylesEx() & FWL_STYLEEXT_CMB_ReadOnly)) {
m_rtBtn =
CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top + borderWidth,
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index a6ba65a3b2..e1d3a748d6 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -81,7 +81,7 @@ void CFWL_DateTimePicker::Update() {
if (!theme)
return;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float fBtn = theme->GetScrollBarWidth();
m_rtBtn = CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top, fBtn - 1,
m_rtClient.height - 1);
@@ -349,8 +349,8 @@ void CFWL_DateTimePicker::DisForm_ShowMonthCalendar(bool bActivate) {
if (bActivate) {
CFX_RectF rtMonthCal = m_pMonthCal->GetAutosizedWidgetRect();
- FX_FLOAT fPopupMin = rtMonthCal.height;
- FX_FLOAT fPopupMax = rtMonthCal.height;
+ float fPopupMin = rtMonthCal.height;
+ float fPopupMax = rtMonthCal.height;
CFX_RectF rtAnchor(m_pProperties->m_rtWidget);
rtAnchor.width = rtMonthCal.width;
rtMonthCal.left = m_rtClient.left;
diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h
index 2935ee8b1c..0f086d6b32 100644
--- a/xfa/fwl/cfwl_datetimepicker.h
+++ b/xfa/fwl/cfwl_datetimepicker.h
@@ -101,7 +101,7 @@ class CFWL_DateTimePicker : public CFWL_Widget {
std::unique_ptr<CFWL_DateTimeEdit> m_pEdit;
std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal;
std::unique_ptr<CFWL_FormProxy> m_pForm;
- FX_FLOAT m_fBtn;
+ float m_fBtn;
};
#endif // XFA_FWL_CFWL_DATETIMEPICKER_H_
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index b3b05a52d0..4ddc3a624b 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -45,13 +45,13 @@ bool FX_EDIT_ISLATINWORD(wchar_t c) {
}
void AddSquigglyPath(CFX_Path* pPathData,
- FX_FLOAT fStartX,
- FX_FLOAT fEndX,
- FX_FLOAT fY,
- FX_FLOAT fStep) {
+ float fStartX,
+ float fEndX,
+ float fY,
+ float fStep) {
pPathData->MoveTo(CFX_PointF(fStartX, fY));
int i = 1;
- for (FX_FLOAT fx = fStartX + fStep; fx < fEndX; fx += fStep, ++i)
+ for (float fx = fStartX + fStep; fx < fEndX; fx += fStep, ++i)
pPathData->LineTo(CFX_PointF(fx, fY + (i & 1) * fStep));
}
@@ -161,16 +161,16 @@ FWL_WidgetHit CFWL_Edit::HitTest(const CFX_PointF& point) {
void CFWL_Edit::AddSpellCheckObj(CFX_Path& PathData,
int32_t nStart,
int32_t nCount,
- FX_FLOAT fOffSetX,
- FX_FLOAT fOffSetY) {
- FX_FLOAT fStartX = 0.0f;
- FX_FLOAT fEndX = 0.0f;
- FX_FLOAT fY = 0.0f;
- FX_FLOAT fStep = 0.0f;
+ float fOffSetX,
+ float fOffSetY) {
+ float fStartX = 0.0f;
+ float fEndX = 0.0f;
+ float fY = 0.0f;
+ float fStep = 0.0f;
CFDE_TxtEdtPage* pPage = m_EdtEngine.GetPage(0);
const FDE_TXTEDTPARAMS* txtEdtParams = m_EdtEngine.GetEditParams();
- FX_FLOAT fAsent = static_cast<FX_FLOAT>(txtEdtParams->pFont->GetAscent()) *
- txtEdtParams->fFontSize / 1000;
+ float fAsent = static_cast<float>(txtEdtParams->pFont->GetAscent()) *
+ txtEdtParams->fFontSize / 1000;
std::vector<CFX_RectF> rectArray;
pPage->CalcRangeRectArray(nStart, nCount, &rectArray);
@@ -195,8 +195,8 @@ void CFWL_Edit::DrawSpellCheck(CFX_Graphics* pGraphics,
CFX_ByteString sLatinWord;
CFX_Path pathSpell;
int32_t nStart = 0;
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
CFX_WideString wsSpell = GetText();
int32_t nContentLen = wsSpell.GetLength();
for (int i = 0; i < nContentLen; i++) {
@@ -468,7 +468,7 @@ bool CFWL_Edit::OnValidate(const CFX_WideString& wsText) {
return event.bValidate;
}
-void CFWL_Edit::SetScrollOffset(FX_FLOAT fScrollOffset) {
+void CFWL_Edit::SetScrollOffset(float fScrollOffset) {
m_fScrollOffsetY = fScrollOffset;
}
@@ -516,8 +516,8 @@ void CFWL_Edit::DrawContent(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_RectF rtClip = m_rtEngine;
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
CFX_Matrix mt(1, 0, 0, 1, fOffSetX, fOffSetY);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
@@ -577,8 +577,8 @@ void CFWL_Edit::DrawContent(CFX_Graphics* pGraphics,
pGraphics->RestoreGraphState();
CFX_Path path;
int32_t iLimit = m_nLimit > 0 ? m_nLimit : 1;
- FX_FLOAT fStep = m_rtEngine.width / iLimit;
- FX_FLOAT fLeft = m_rtEngine.left + 1;
+ float fStep = m_rtEngine.width / iLimit;
+ float fLeft = m_rtEngine.left + 1;
for (int32_t i = 1; i < iLimit; i++) {
fLeft += fStep;
path.AddLine(CFX_PointF(fLeft, m_rtClient.top),
@@ -710,8 +710,8 @@ void CFWL_Edit::UpdateEditLayout() {
bool CFWL_Edit::UpdateOffset() {
CFX_RectF rtCaret;
m_EdtEngine.GetCaretRect(rtCaret);
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
rtCaret.Offset(fOffSetX, fOffSetY);
const CFX_RectF& rtEidt = m_rtEngine;
if (rtEidt.Contains(rtCaret)) {
@@ -732,8 +732,8 @@ bool CFWL_Edit::UpdateOffset() {
return false;
}
- FX_FLOAT offsetX = 0.0;
- FX_FLOAT offsetY = 0.0;
+ float offsetX = 0.0;
+ float offsetY = 0.0;
if (rtCaret.left < rtEidt.left)
offsetX = rtCaret.left - rtEidt.left;
if (rtCaret.right() > rtEidt.right())
@@ -749,7 +749,7 @@ bool CFWL_Edit::UpdateOffset() {
return true;
}
-bool CFWL_Edit::UpdateOffset(CFWL_ScrollBar* pScrollBar, FX_FLOAT fPosChanged) {
+bool CFWL_Edit::UpdateOffset(CFWL_ScrollBar* pScrollBar, float fPosChanged) {
if (pScrollBar == m_pHorzScrollBar.get())
m_fScrollOffsetX += fPosChanged;
else
@@ -763,9 +763,9 @@ void CFWL_Edit::UpdateVAlignment() {
return;
const CFX_RectF& rtFDE = pPage->GetContentsBox();
- FX_FLOAT fOffsetY = 0.0f;
- FX_FLOAT fSpaceAbove = 0.0f;
- FX_FLOAT fSpaceBelow = 0.0f;
+ float fOffsetY = 0.0f;
+ float fSpaceAbove = 0.0f;
+ float fSpaceBelow = 0.0f;
IFWL_ThemeProvider* theme = GetAvailableTheme();
if (theme) {
CFWL_ThemePart part;
@@ -807,7 +807,7 @@ void CFWL_Edit::UpdateCaret() {
CFX_RectF rtClient = GetClientRect();
rtCaret.Intersect(rtClient);
if (rtCaret.left > rtClient.right()) {
- FX_FLOAT right = rtCaret.right();
+ float right = rtCaret.right();
rtCaret.left = rtClient.right() - 1;
rtCaret.width = right - rtCaret.left;
}
@@ -838,10 +838,10 @@ CFWL_ScrollBar* CFWL_Edit::UpdateScroll() {
CFX_RectF rtScroll = m_pHorzScrollBar->GetWidgetRect();
if (rtScroll.width < rtFDE.width) {
m_pHorzScrollBar->LockUpdate();
- FX_FLOAT fRange = rtFDE.width - rtScroll.width;
+ float fRange = rtFDE.width - rtScroll.width;
m_pHorzScrollBar->SetRange(0.0f, fRange);
- FX_FLOAT fPos = std::min(std::max(m_fScrollOffsetX, 0.0f), fRange);
+ float fPos = std::min(std::max(m_fScrollOffsetX, 0.0f), fRange);
m_pHorzScrollBar->SetPos(fPos);
m_pHorzScrollBar->SetTrackPos(fPos);
m_pHorzScrollBar->SetPageSize(rtScroll.width);
@@ -864,11 +864,11 @@ CFWL_ScrollBar* CFWL_Edit::UpdateScroll() {
CFX_RectF rtScroll = m_pVertScrollBar->GetWidgetRect();
if (rtScroll.height < rtFDE.height) {
m_pVertScrollBar->LockUpdate();
- FX_FLOAT fStep = m_EdtEngine.GetEditParams()->fLineSpace;
- FX_FLOAT fRange = std::max(rtFDE.height - m_rtEngine.height, fStep);
+ float fStep = m_EdtEngine.GetEditParams()->fLineSpace;
+ float fRange = std::max(rtFDE.height - m_rtEngine.height, fStep);
m_pVertScrollBar->SetRange(0.0f, fRange);
- FX_FLOAT fPos = std::min(std::max(m_fScrollOffsetY, 0.0f), fRange);
+ float fPos = std::min(std::max(m_fScrollOffsetY, 0.0f), fRange);
m_pVertScrollBar->SetPos(fPos);
m_pVertScrollBar->SetTrackPos(fPos);
m_pVertScrollBar->SetPageSize(rtScroll.height);
@@ -934,7 +934,7 @@ void CFWL_Edit::Layout() {
if (!theme)
return;
- FX_FLOAT fWidth = theme->GetScrollBarWidth();
+ float fWidth = theme->GetScrollBarWidth();
CFWL_ThemePart part;
if (!m_pOuter) {
part.m_pWidget = this;
@@ -1004,7 +1004,7 @@ void CFWL_Edit::LayoutScrollBar() {
bool bShowHorzScrollbar = IsShowScrollBar(false);
IFWL_ThemeProvider* theme = GetAvailableTheme();
- FX_FLOAT fWidth = theme ? theme->GetScrollBarWidth() : 0;
+ float fWidth = theme ? theme->GetScrollBarWidth() : 0;
if (bShowVertScrollbar) {
if (!m_pVertScrollBar) {
InitVerticalScrollBar();
@@ -1483,11 +1483,11 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) {
bool CFWL_Edit::OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos) {
+ float fPos) {
CFX_SizeF fs;
pScrollBar->GetRange(&fs.width, &fs.height);
- FX_FLOAT iCurPos = pScrollBar->GetPos();
- FX_FLOAT fStep = pScrollBar->GetStepSize();
+ float iCurPos = pScrollBar->GetPos();
+ float fStep = pScrollBar->GetStepSize();
switch (dwCode) {
case CFWL_EventScroll::Code::Min: {
fPos = fs.width;
diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h
index 13e4be2c68..0dbbcd6eef 100644
--- a/xfa/fwl/cfwl_edit.h
+++ b/xfa/fwl/cfwl_edit.h
@@ -100,7 +100,7 @@ class CFWL_Edit : public CFWL_Widget {
bool OnPageUnload(int32_t nPageIndex);
void OnAddDoRecord(std::unique_ptr<IFDE_TxtEdtDoRecord> pRecord);
bool OnValidate(const CFX_WideString& wsText);
- void SetScrollOffset(FX_FLOAT fScrollOffset);
+ void SetScrollOffset(float fScrollOffset);
protected:
void ShowCaret(CFX_RectF* pRect);
@@ -121,7 +121,7 @@ class CFWL_Edit : public CFWL_Widget {
void UpdateEditParams();
void UpdateEditLayout();
bool UpdateOffset();
- bool UpdateOffset(CFWL_ScrollBar* pScrollBar, FX_FLOAT fPosChanged);
+ bool UpdateOffset(CFWL_ScrollBar* pScrollBar, float fPosChanged);
void UpdateVAlignment();
void UpdateCaret();
CFWL_ScrollBar* UpdateScroll();
@@ -141,8 +141,8 @@ class CFWL_Edit : public CFWL_Widget {
void AddSpellCheckObj(CFX_Path& PathData,
int32_t nStart,
int32_t nCount,
- FX_FLOAT fOffSetX,
- FX_FLOAT fOffSetY);
+ float fOffSetX,
+ float fOffSetY);
void DoButtonDown(CFWL_MessageMouse* pMsg);
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
@@ -154,19 +154,19 @@ class CFWL_Edit : public CFWL_Widget {
void OnChar(CFWL_MessageKey* pMsg);
bool OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos);
+ float fPos);
CFX_RectF m_rtClient;
CFX_RectF m_rtEngine;
CFX_RectF m_rtStatic;
- FX_FLOAT m_fVAlignOffset;
- FX_FLOAT m_fScrollOffsetX;
- FX_FLOAT m_fScrollOffsetY;
+ float m_fVAlignOffset;
+ float m_fScrollOffsetX;
+ float m_fScrollOffsetY;
CFDE_TxtEdtEngine m_EdtEngine;
bool m_bLButtonDown;
int32_t m_nSelStart;
int32_t m_nLimit;
- FX_FLOAT m_fFontSize;
+ float m_fFontSize;
bool m_bSetRange;
int32_t m_iMax;
std::unique_ptr<CFWL_ScrollBar> m_pVertScrollBar;
diff --git a/xfa/fwl/cfwl_eventscroll.h b/xfa/fwl/cfwl_eventscroll.h
index 2fdef9e7b1..a13eeef020 100644
--- a/xfa/fwl/cfwl_eventscroll.h
+++ b/xfa/fwl/cfwl_eventscroll.h
@@ -28,7 +28,7 @@ class CFWL_EventScroll : public CFWL_Event {
~CFWL_EventScroll() override;
Code m_iScrollCode;
- FX_FLOAT m_fPos;
+ float m_fPos;
};
#endif // XFA_FWL_CFWL_EVENTSCROLL_H_
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index 5e956ade2d..1b2d668e5a 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -161,8 +161,8 @@ void CFWL_Form::DrawBackground(CFX_Graphics* pGraphics,
CFX_RectF CFWL_Form::GetEdgeRect() {
CFX_RectF rtEdge = m_rtRelative;
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) {
- FX_FLOAT fCX = GetBorderSize(true);
- FX_FLOAT fCY = GetBorderSize(false);
+ float fCX = GetBorderSize(true);
+ float fCY = GetBorderSize(false);
rtEdge.Deflate(fCX, fCY, fCX, fCY);
}
return rtEdge;
diff --git a/xfa/fwl/cfwl_form.h b/xfa/fwl/cfwl_form.h
index 7202cb279b..ec7fc137be 100644
--- a/xfa/fwl/cfwl_form.h
+++ b/xfa/fwl/cfwl_form.h
@@ -63,8 +63,8 @@ class CFWL_Form : public CFWL_Widget {
CFX_RectF m_rtRelative;
std::unique_ptr<CFWL_NoteLoop> m_pNoteLoop;
CFWL_Widget* m_pSubFocus;
- FX_FLOAT m_fCXBorder;
- FX_FLOAT m_fCYBorder;
+ float m_fCXBorder;
+ float m_fCYBorder;
};
#endif // XFA_FWL_CFWL_FORM_H_
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index 0b82709972..925c6f1f72 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -306,11 +306,11 @@ void CFWL_ListBox::SetFocusItem(CFWL_ListItem* pItem) {
CFWL_ListItem* CFWL_ListBox::GetItemAtPoint(const CFX_PointF& point) {
CFX_PointF pos = point - m_rtConent.TopLeft();
- FX_FLOAT fPosX = 0.0f;
+ float fPosX = 0.0f;
if (m_pHorzScrollBar)
fPosX = m_pHorzScrollBar->GetPos();
- FX_FLOAT fPosY = 0.0;
+ float fPosY = 0.0;
if (m_pVertScrollBar)
fPosY = m_pVertScrollBar->GetPos();
@@ -334,7 +334,7 @@ bool CFWL_ListBox::ScrollToVisible(CFWL_ListItem* pItem) {
CFX_RectF rtItem = pItem ? pItem->GetRect() : CFX_RectF();
bool bScroll = false;
- FX_FLOAT fPosY = m_pVertScrollBar->GetPos();
+ float fPosY = m_pVertScrollBar->GetPos();
rtItem.Offset(0, -fPosY + m_rtConent.top);
if (rtItem.top < m_rtConent.top) {
fPosY += rtItem.top - m_rtConent.top;
@@ -378,11 +378,11 @@ void CFWL_ListBox::DrawBkground(CFX_Graphics* pGraphics,
void CFWL_ListBox::DrawItems(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix) {
- FX_FLOAT fPosX = 0.0f;
+ float fPosX = 0.0f;
if (m_pHorzScrollBar)
fPosX = m_pHorzScrollBar->GetPos();
- FX_FLOAT fPosY = 0.0f;
+ float fPosY = 0.0f;
if (m_pVertScrollBar)
fPosY = m_pVertScrollBar->GetPos();
@@ -484,11 +484,10 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
pUIMargin.height);
}
- FX_FLOAT fWidth = GetMaxTextWidth();
+ float fWidth = GetMaxTextWidth();
fWidth += 2 * kItemTextMargin;
if (!bAutoSize) {
- FX_FLOAT fActualWidth =
- m_rtClient.width - rtUIMargin.left - rtUIMargin.width;
+ float fActualWidth = m_rtClient.width - rtUIMargin.left - rtUIMargin.width;
fWidth = std::max(fWidth, fActualWidth);
}
m_fItemHeight = CalcItemHeight();
@@ -502,7 +501,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
if (bAutoSize)
return fs;
- FX_FLOAT iHeight = m_rtClient.height;
+ float iHeight = m_rtClient.height;
bool bShowVertScr = false;
bool bShowHorzScr = false;
if (!bShowVertScr && (m_pProperties->m_dwStyles & FWL_WGTSTYLE_VScroll))
@@ -527,7 +526,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
m_pVertScrollBar->SetPageSize(rtScrollBar.height * 9 / 10);
m_pVertScrollBar->SetStepSize(m_fItemHeight);
- FX_FLOAT fPos =
+ float fPos =
std::min(std::max(m_pVertScrollBar->GetPos(), 0.f), szRange.height);
m_pVertScrollBar->SetPos(fPos);
m_pVertScrollBar->SetTrackPos(fPos);
@@ -559,7 +558,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
m_pHorzScrollBar->SetPageSize(fWidth * 9 / 10);
m_pHorzScrollBar->SetStepSize(fWidth / 10);
- FX_FLOAT fPos =
+ float fPos =
std::min(std::max(m_pHorzScrollBar->GetPos(), 0.f), szRange.height);
m_pHorzScrollBar->SetPos(fPos);
m_pHorzScrollBar->SetTrackPos(fPos);
@@ -584,8 +583,8 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
void CFWL_ListBox::UpdateItemSize(CFWL_ListItem* pItem,
CFX_SizeF& size,
- FX_FLOAT fWidth,
- FX_FLOAT fItemHeight,
+ float fWidth,
+ float fItemHeight,
bool bAutoSize) const {
if (!bAutoSize && pItem) {
CFX_RectF rtItem(0, size.height, fWidth, fItemHeight);
@@ -595,8 +594,8 @@ void CFWL_ListBox::UpdateItemSize(CFWL_ListItem* pItem,
size.height += fItemHeight;
}
-FX_FLOAT CFWL_ListBox::GetMaxTextWidth() {
- FX_FLOAT fRet = 0.0f;
+float CFWL_ListBox::GetMaxTextWidth() {
+ float fRet = 0.0f;
int32_t iCount = CountItems(this);
for (int32_t i = 0; i < iCount; i++) {
CFWL_ListItem* pItem = GetItem(this, i);
@@ -610,12 +609,12 @@ FX_FLOAT CFWL_ListBox::GetMaxTextWidth() {
return fRet;
}
-FX_FLOAT CFWL_ListBox::GetScrollWidth() {
+float CFWL_ListBox::GetScrollWidth() {
IFWL_ThemeProvider* theme = GetAvailableTheme();
return theme ? theme->GetScrollBarWidth() : 0.0f;
}
-FX_FLOAT CFWL_ListBox::CalcItemHeight() {
+float CFWL_ListBox::CalcItemHeight() {
IFWL_ThemeProvider* theme = GetAvailableTheme();
CFWL_ThemePart part;
part.m_pWidget = this;
@@ -838,11 +837,11 @@ void CFWL_ListBox::OnVK(CFWL_ListItem* pItem, bool bShift, bool bCtrl) {
bool CFWL_ListBox::OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos) {
+ float fPos) {
CFX_SizeF fs;
pScrollBar->GetRange(&fs.width, &fs.height);
- FX_FLOAT iCurPos = pScrollBar->GetPos();
- FX_FLOAT fStep = pScrollBar->GetStepSize();
+ float iCurPos = pScrollBar->GetPos();
+ float fStep = pScrollBar->GetStepSize();
switch (dwCode) {
case CFWL_EventScroll::Code::Min: {
fPos = fs.width;
diff --git a/xfa/fwl/cfwl_listbox.h b/xfa/fwl/cfwl_listbox.h
index caa4f509f8..18aaf4cbd5 100644
--- a/xfa/fwl/cfwl_listbox.h
+++ b/xfa/fwl/cfwl_listbox.h
@@ -63,8 +63,8 @@ class CFWL_ListBox : public CFWL_Widget {
int32_t GetSelIndex(int32_t nIndex);
void SetSelItem(CFWL_ListItem* hItem, bool bSelect);
- FX_FLOAT GetItemHeight() const { return m_fItemHeight; }
- FX_FLOAT CalcItemHeight();
+ float GetItemHeight() const { return m_fItemHeight; }
+ float CalcItemHeight();
protected:
CFWL_ListItem* GetListItem(CFWL_ListItem* hItem, uint32_t dwKeyCode);
@@ -101,11 +101,11 @@ class CFWL_ListBox : public CFWL_Widget {
CFX_SizeF CalcSize(bool bAutoSize);
void UpdateItemSize(CFWL_ListItem* hItem,
CFX_SizeF& size,
- FX_FLOAT fWidth,
- FX_FLOAT fHeight,
+ float fWidth,
+ float fHeight,
bool bAutoSize) const;
- FX_FLOAT GetMaxTextWidth();
- FX_FLOAT GetScrollWidth();
+ float GetMaxTextWidth();
+ float GetScrollWidth();
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
void OnLButtonDown(CFWL_MessageMouse* pMsg);
@@ -115,7 +115,7 @@ class CFWL_ListBox : public CFWL_Widget {
void OnVK(CFWL_ListItem* hItem, bool bShift, bool bCtrl);
bool OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos);
+ float fPos);
CFX_RectF m_rtClient;
CFX_RectF m_rtStatic;
@@ -125,8 +125,8 @@ class CFWL_ListBox : public CFWL_Widget {
uint32_t m_dwTTOStyles;
int32_t m_iTTOAligns;
CFWL_ListItem* m_hAnchor;
- FX_FLOAT m_fItemHeight;
- FX_FLOAT m_fScorllBarWidth;
+ float m_fItemHeight;
+ float m_fScorllBarWidth;
bool m_bLButtonDown;
IFWL_ThemeProvider* m_pScrollBarTP;
std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray;
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 2dcac03731..6d6066370d 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -415,8 +415,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
CFWL_ThemePart params;
params.m_pWidget = this;
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
- FX_FLOAT fMaxWeekW = 0.0f;
- FX_FLOAT fMaxWeekH = 0.0f;
+ float fMaxWeekW = 0.0f;
+ float fMaxWeekH = 0.0f;
for (uint32_t i = 0; i < 7; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForDay(pTheme, params, i),
@@ -425,8 +425,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fMaxWeekH = (fMaxWeekH >= sz.height) ? fMaxWeekH : sz.height;
}
- FX_FLOAT fDayMaxW = 0.0f;
- FX_FLOAT fDayMaxH = 0.0f;
+ float fDayMaxW = 0.0f;
+ float fDayMaxH = 0.0f;
for (int day = 10; day <= 31; day++) {
CFX_WideString wsDay;
wsDay.Format(L"%d", day);
@@ -434,16 +434,16 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fDayMaxW = (fDayMaxW >= sz.width) ? fDayMaxW : sz.width;
fDayMaxH = (fDayMaxH >= sz.height) ? fDayMaxH : sz.height;
}
- m_szCell.width = FX_FLOAT((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
- : (int)(fDayMaxW + 0.5));
+ m_szCell.width = float((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
+ : (int)(fDayMaxW + 0.5));
m_szCell.height = (fMaxWeekH >= fDayMaxH) ? fMaxWeekH : fDayMaxH;
CFX_SizeF fs;
fs.width = m_szCell.width * MONTHCAL_COLUMNS +
MONTHCAL_HMARGIN * MONTHCAL_COLUMNS * 2 +
MONTHCAL_HEADER_BTN_HMARGIN * 2;
- FX_FLOAT fMonthMaxW = 0.0f;
- FX_FLOAT fMonthMaxH = 0.0f;
+ float fMonthMaxW = 0.0f;
+ float fMonthMaxH = 0.0f;
for (uint32_t i = 0; i < 12; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForMonth(pTheme, params, i),
@@ -472,8 +472,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
}
void CFWL_MonthCalendar::CalcHeadSize() {
- FX_FLOAT fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
- FX_FLOAT fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
+ float fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
+ float fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
m_rtHeadText = CFX_RectF(m_rtClient.left + fHeadHMargin,
m_rtClient.top + MONTHCAL_HEADER_BTN_VMARGIN +
MONTHCAL_VMARGIN + fHeadVMargin,
@@ -527,8 +527,8 @@ void CFWL_MonthCalendar::Layout() {
void CFWL_MonthCalendar::CalDateItem() {
bool bNewWeek = false;
int32_t iWeekOfMonth = 0;
- FX_FLOAT fLeft = m_rtDates.left;
- FX_FLOAT fTop = m_rtDates.top;
+ float fLeft = m_rtDates.left;
+ float fTop = m_rtDates.top;
for (const auto& pDateInfo : m_arrDates) {
if (bNewWeek) {
iWeekOfMonth++;
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 1da2674550..abe99dacce 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -90,14 +90,14 @@ void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
DrawThumb(pGraphics, pTheme, pMatrix);
}
-void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) {
+void CFWL_ScrollBar::SetTrackPos(float fTrackPos) {
m_fTrackPos = fTrackPos;
m_rtThumb = CalcThumbButtonRect(m_rtThumb);
m_rtMinTrack = CalcMinTrackRect(m_rtMinTrack);
m_rtMaxTrack = CalcMaxTrackRect(m_rtMaxTrack);
}
-bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) {
+bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, float fPos) {
if (dwCode == CFWL_EventScroll::Code::None)
return false;
return OnScroll(dwCode, fPos);
@@ -164,7 +164,7 @@ void CFWL_ScrollBar::Layout() {
void CFWL_ScrollBar::CalcButtonLen() {
m_fButtonLen = IsVertical() ? m_rtClient.width : m_rtClient.height;
- FX_FLOAT fLength = IsVertical() ? m_rtClient.height : m_rtClient.width;
+ float fLength = IsVertical() ? m_rtClient.height : m_rtClient.width;
if (fLength < m_fButtonLen * 2) {
m_fButtonLen = fLength / 2;
m_bMinSize = true;
@@ -199,7 +199,7 @@ CFX_RectF CFWL_ScrollBar::CalcThumbButtonRect(const CFX_RectF& rtThumb) {
return rect;
}
- FX_FLOAT fRange = m_fRangeMax - m_fRangeMin;
+ float fRange = m_fRangeMax - m_fRangeMin;
if (fRange < 0) {
if (IsVertical()) {
return CFX_RectF(m_rtClient.left, m_rtMaxBtn.bottom(), m_rtClient.width,
@@ -209,22 +209,21 @@ CFX_RectF CFWL_ScrollBar::CalcThumbButtonRect(const CFX_RectF& rtThumb) {
}
CFX_RectF rtClient = m_rtClient;
- FX_FLOAT fLength = IsVertical() ? rtClient.height : rtClient.width;
- FX_FLOAT fSize = m_fButtonLen;
+ float fLength = IsVertical() ? rtClient.height : rtClient.width;
+ float fSize = m_fButtonLen;
fLength -= fSize * 2.0f;
if (fLength < fSize)
fLength = 0.0f;
- FX_FLOAT fThumbSize = fLength * fLength / (fRange + fLength);
+ float fThumbSize = fLength * fLength / (fRange + fLength);
fThumbSize = std::max(fThumbSize, kMinThumbSize);
- FX_FLOAT fDiff = std::max(fLength - fThumbSize, 0.0f);
- FX_FLOAT fTrackPos =
- std::max(std::min(m_fTrackPos, m_fRangeMax), m_fRangeMin);
+ float fDiff = std::max(fLength - fThumbSize, 0.0f);
+ float fTrackPos = std::max(std::min(m_fTrackPos, m_fRangeMax), m_fRangeMin);
if (!fRange)
return rect;
- FX_FLOAT iPos = fSize + fDiff * (fTrackPos - m_fRangeMin) / fRange;
+ float iPos = fSize + fDiff * (fTrackPos - m_fRangeMin) / fRange;
rect.left = rtClient.left;
rect.top = rtClient.top;
if (IsVertical()) {
@@ -264,20 +263,20 @@ CFX_RectF CFWL_ScrollBar::CalcMaxTrackRect(const CFX_RectF& rtMaxRect) {
return CFX_RectF(rtMaxRect.TopLeft(), 0, 0);
if (IsVertical()) {
- FX_FLOAT iy = (m_rtThumb.top + m_rtThumb.bottom()) / 2;
+ float iy = (m_rtThumb.top + m_rtThumb.bottom()) / 2;
return CFX_RectF(m_rtClient.left, iy, m_rtClient.width,
m_rtClient.bottom() - iy);
}
- FX_FLOAT ix = (m_rtThumb.left + m_rtThumb.right()) / 2;
+ float ix = (m_rtThumb.left + m_rtThumb.right()) / 2;
return CFX_RectF(ix, m_rtClient.top, m_rtClient.height - ix,
m_rtClient.height);
}
-FX_FLOAT CFWL_ScrollBar::GetTrackPointPos(const CFX_PointF& point) {
+float CFWL_ScrollBar::GetTrackPointPos(const CFX_PointF& point) {
CFX_PointF diff = point - m_cpTrackPoint;
- FX_FLOAT fRange = m_fRangeMax - m_fRangeMin;
- FX_FLOAT fPos;
+ float fRange = m_fRangeMax - m_fRangeMin;
+ float fPos;
if (IsVertical()) {
fPos = fRange * diff.y /
@@ -317,7 +316,7 @@ bool CFWL_ScrollBar::SendEvent() {
return true;
}
-bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) {
+bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, float fPos) {
CFWL_EventScroll ev(this);
ev.m_iScrollCode = dwCode;
ev.m_fPos = fPos;
diff --git a/xfa/fwl/cfwl_scrollbar.h b/xfa/fwl/cfwl_scrollbar.h
index 6a67fa8687..262d0794d8 100644
--- a/xfa/fwl/cfwl_scrollbar.h
+++ b/xfa/fwl/cfwl_scrollbar.h
@@ -35,23 +35,23 @@ class CFWL_ScrollBar : public CFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- void GetRange(FX_FLOAT* fMin, FX_FLOAT* fMax) const {
+ void GetRange(float* fMin, float* fMax) const {
ASSERT(fMin);
ASSERT(fMax);
*fMin = m_fRangeMin;
*fMax = m_fRangeMax;
}
- void SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
+ void SetRange(float fMin, float fMax) {
m_fRangeMin = fMin;
m_fRangeMax = fMax;
}
- FX_FLOAT GetPageSize() const { return m_fPageSize; }
- void SetPageSize(FX_FLOAT fPageSize) { m_fPageSize = fPageSize; }
- FX_FLOAT GetStepSize() const { return m_fStepSize; }
- void SetStepSize(FX_FLOAT fStepSize) { m_fStepSize = fStepSize; }
- FX_FLOAT GetPos() const { return m_fPos; }
- void SetPos(FX_FLOAT fPos) { m_fPos = fPos; }
- void SetTrackPos(FX_FLOAT fTrackPos);
+ float GetPageSize() const { return m_fPageSize; }
+ void SetPageSize(float fPageSize) { m_fPageSize = fPageSize; }
+ float GetStepSize() const { return m_fStepSize; }
+ void SetStepSize(float fStepSize) { m_fStepSize = fStepSize; }
+ float GetPos() const { return m_fPos; }
+ void SetPos(float fPos) { m_fPos = fPos; }
+ void SetTrackPos(float fTrackPos);
private:
class Timer : public CFWL_Timer {
@@ -84,16 +84,16 @@ class CFWL_ScrollBar : public CFWL_Widget {
CFX_RectF CalcThumbButtonRect(const CFX_RectF& rtThumbRect);
CFX_RectF CalcMinTrackRect(const CFX_RectF& rtMinRect);
CFX_RectF CalcMaxTrackRect(const CFX_RectF& rtMaxRect);
- FX_FLOAT GetTrackPointPos(const CFX_PointF& point);
+ float GetTrackPointPos(const CFX_PointF& point);
bool SendEvent();
- bool OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos);
+ bool OnScroll(CFWL_EventScroll::Code dwCode, float fPos);
void OnLButtonDown(const CFX_PointF& point);
void OnLButtonUp(const CFX_PointF& point);
void OnMouseMove(const CFX_PointF& point);
void OnMouseLeave();
void OnMouseWheel(const CFX_PointF& delta);
- bool DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos);
+ bool DoScroll(CFWL_EventScroll::Code dwCode, float fPos);
void DoMouseDown(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState,
@@ -110,22 +110,22 @@ class CFWL_ScrollBar : public CFWL_Widget {
void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
CFWL_TimerInfo* m_pTimerInfo;
- FX_FLOAT m_fRangeMin;
- FX_FLOAT m_fRangeMax;
- FX_FLOAT m_fPageSize;
- FX_FLOAT m_fStepSize;
- FX_FLOAT m_fPos;
- FX_FLOAT m_fTrackPos;
+ float m_fRangeMin;
+ float m_fRangeMax;
+ float m_fPageSize;
+ float m_fStepSize;
+ float m_fPos;
+ float m_fTrackPos;
int32_t m_iMinButtonState;
int32_t m_iMaxButtonState;
int32_t m_iThumbButtonState;
int32_t m_iMinTrackState;
int32_t m_iMaxTrackState;
- FX_FLOAT m_fLastTrackPos;
+ float m_fLastTrackPos;
CFX_PointF m_cpTrackPoint;
int32_t m_iMouseWheel;
bool m_bMouseDown;
- FX_FLOAT m_fButtonLen;
+ float m_fButtonLen;
bool m_bMinSize;
CFX_RectF m_rtClient;
CFX_RectF m_rtThumb;
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index b5b8bf4c7d..f3ca6c012a 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -77,7 +77,7 @@ CFX_RectF CFWL_Widget::GetWidgetRect() {
void CFWL_Widget::InflateWidgetRect(CFX_RectF& rect) {
if (HasBorder()) {
- FX_FLOAT fBorder = GetBorderSize(true);
+ float fBorder = GetBorderSize(true);
rect.Inflate(fBorder, fBorder);
}
}
@@ -269,14 +269,14 @@ CFX_RectF CFWL_Widget::GetEdgeRect() {
CFX_RectF rtEdge(0, 0, m_pProperties->m_rtWidget.width,
m_pProperties->m_rtWidget.height);
if (HasBorder()) {
- FX_FLOAT fCX = GetBorderSize(true);
- FX_FLOAT fCY = GetBorderSize(false);
+ float fCX = GetBorderSize(true);
+ float fCY = GetBorderSize(false);
rtEdge.Deflate(fCX, fCY);
}
return rtEdge;
}
-FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
+float CFWL_Widget::GetBorderSize(bool bCX) {
IFWL_ThemeProvider* theme = GetAvailableTheme();
if (!theme)
return 0.0f;
@@ -328,8 +328,7 @@ CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText,
calPart.m_dwTTOStyles =
bMultiLine ? FDE_TTOSTYLE_LineWrap : FDE_TTOSTYLE_SingleLine;
calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
- FX_FLOAT fWidth =
- bMultiLine ? FWL_WGT_CalcMultiLineDefWidth : FWL_WGT_CalcWidth;
+ float fWidth = bMultiLine ? FWL_WGT_CalcMultiLineDefWidth : FWL_WGT_CalcWidth;
CFX_RectF rect(0, 0, fWidth, FWL_WGT_CalcHeight);
pTheme->CalcTextRect(&calPart, rect);
return CFX_SizeF(rect.width, rect.height);
@@ -378,8 +377,8 @@ void CFWL_Widget::SetGrab(bool bSet) {
pDriver->SetGrab(this, bSet);
}
-void CFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+void CFWL_Widget::GetPopupPos(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
if (GetClassID() == FWL_Type::ComboBox) {
@@ -400,13 +399,13 @@ void CFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight,
GetPopupPosGeneral(fMinHeight, fMaxHeight, rtAnchor, rtPopup);
}
-bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosMenu(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
if (GetStylesEx() & FWL_STYLEEXT_MNU_Vert) {
bool bLeft = m_pProperties->m_rtWidget.left < 0;
- FX_FLOAT fRight = rtAnchor.right() + rtPopup.width;
+ float fRight = rtAnchor.right() + rtPopup.width;
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
if (fRight + point.x > 0.0f || bLeft) {
rtPopup = CFX_RectF(rtAnchor.left - rtPopup.width, rtAnchor.top,
@@ -419,7 +418,7 @@ bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
return true;
}
- FX_FLOAT fBottom = rtAnchor.bottom() + rtPopup.height;
+ float fBottom = rtAnchor.bottom() + rtPopup.height;
CFX_PointF point = TransformTo(nullptr, point);
if (fBottom + point.y > 0.0f) {
rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.top - rtPopup.height,
@@ -432,18 +431,18 @@ bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
return true;
}
-bool CFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosComboBox(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
- FX_FLOAT fPopHeight = rtPopup.height;
+ float fPopHeight = rtPopup.height;
if (rtPopup.height > fMaxHeight)
fPopHeight = fMaxHeight;
else if (rtPopup.height < fMinHeight)
fPopHeight = fMinHeight;
- FX_FLOAT fWidth = std::max(rtAnchor.width, rtPopup.width);
- FX_FLOAT fBottom = rtAnchor.bottom() + fPopHeight;
+ float fWidth = std::max(rtAnchor.width, rtPopup.width);
+ float fBottom = rtAnchor.bottom() + fPopHeight;
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
if (fBottom + point.y > 0.0f) {
rtPopup =
@@ -456,8 +455,8 @@ bool CFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight,
return true;
}
-bool CFWL_Widget::GetPopupPosGeneral(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosGeneral(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 2387b753e5..b556e7a424 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -122,7 +122,7 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
bool IsLocked() const { return m_iLock > 0; }
bool HasBorder() const;
CFX_RectF GetEdgeRect();
- FX_FLOAT GetBorderSize(bool bCX);
+ float GetBorderSize(bool bCX);
CFX_RectF GetRelativeRect();
IFWL_ThemeProvider* GetAvailableTheme();
CFX_SizeF CalcTextSize(const CFX_WideString& wsText,
@@ -134,8 +134,8 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
int32_t iTTOAlign,
CFX_RectF& rect);
void SetGrab(bool bSet);
- void GetPopupPos(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ void GetPopupPos(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
void RegisterEventTarget(CFWL_Widget* pEventSource);
@@ -161,16 +161,16 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
bool IsPopup() const;
bool IsChild() const;
CFWL_Widget* GetRootOuter();
- bool GetPopupPosMenu(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosMenu(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
- bool GetPopupPosComboBox(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosComboBox(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
- bool GetPopupPosGeneral(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosGeneral(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
void DrawBackground(CFX_Graphics* pGraphics,
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 7c0fddd419..d87556e158 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -383,8 +383,8 @@ bool CFWL_WidgetMgr::IsAbleNative(CFWL_Widget* pWidget) const {
}
void CFWL_WidgetMgr::GetAdapterPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) const {
m_pAdapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, rtPopup);
@@ -533,8 +533,8 @@ bool CFWL_WidgetMgr::IsNeedRepaint(CFWL_Widget* pWidget,
bool bOrginPtIntersectWidthDirty = rtDirty.Contains(rtWidget.TopLeft());
static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
FXSYS_memset(hitPoint, 0, sizeof(hitPoint));
- FX_FLOAT fxPiece = rtWidget.width / kNeedRepaintHitPiece;
- FX_FLOAT fyPiece = rtWidget.height / kNeedRepaintHitPiece;
+ float fxPiece = rtWidget.width / kNeedRepaintHitPiece;
+ float fyPiece = rtWidget.height / kNeedRepaintHitPiece;
hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left;
hitPoint[0].hitPoint.x = hitPoint[3].hitPoint.x = hitPoint[7].hitPoint.x =
hitPoint[10].hitPoint.x = fxPiece + rtWidget.left;
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 2d436bd8e2..c3dca31d76 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -64,8 +64,8 @@ class CFWL_WidgetMgr : public CFWL_WidgetMgrDelegate {
}
void GetAdapterPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) const;
diff --git a/xfa/fwl/cfx_barcode.cpp b/xfa/fwl/cfx_barcode.cpp
index 1c22367901..cbd6b09975 100644
--- a/xfa/fwl/cfx_barcode.cpp
+++ b/xfa/fwl/cfx_barcode.cpp
@@ -160,7 +160,7 @@ bool CFX_Barcode::SetFont(CFX_Font* pFont) {
}
}
-bool CFX_Barcode::SetFontSize(FX_FLOAT size) {
+bool CFX_Barcode::SetFontSize(float size) {
switch (GetType()) {
case BC_CODE39:
case BC_CODABAR:
diff --git a/xfa/fwl/cfx_barcode.h b/xfa/fwl/cfx_barcode.h
index 3f4b340d95..d3df216977 100644
--- a/xfa/fwl/cfx_barcode.h
+++ b/xfa/fwl/cfx_barcode.h
@@ -46,7 +46,7 @@ class CFX_Barcode {
bool SetCalChecksum(bool state);
bool SetFont(CFX_Font* pFont);
- bool SetFontSize(FX_FLOAT size);
+ bool SetFontSize(float size);
bool SetFontColor(FX_ARGB color);
bool SetTextLocation(BC_TEXT_LOC location);
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 1d185b4c33..76a20fe14a 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -92,8 +92,8 @@ void CFWL_CheckBoxTP::DrawSignCross(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fRight = pRtSign->right();
- FX_FLOAT fBottom = pRtSign->bottom();
+ float fRight = pRtSign->right();
+ float fBottom = pRtSign->bottom();
path.AddLine(pRtSign->TopLeft(), CFX_PointF(fRight, fBottom));
path.AddLine(CFX_PointF(pRtSign->left, fBottom),
CFX_PointF(fRight, pRtSign->top));
@@ -111,9 +111,9 @@ void CFWL_CheckBoxTP::DrawSignDiamond(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fWidth = pRtSign->width;
- FX_FLOAT fHeight = pRtSign->height;
- FX_FLOAT fBottom = pRtSign->bottom();
+ float fWidth = pRtSign->width;
+ float fHeight = pRtSign->height;
+ float fBottom = pRtSign->bottom();
path.MoveTo(CFX_PointF(pRtSign->left + fWidth / 2, pRtSign->top));
path.LineTo(CFX_PointF(pRtSign->left, pRtSign->top + fHeight / 2));
path.LineTo(CFX_PointF(pRtSign->left + fWidth / 2, fBottom));
@@ -146,18 +146,18 @@ void CFWL_CheckBoxTP::DrawSignStar(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fBottom = pRtSign->bottom();
- FX_FLOAT fRadius =
- (pRtSign->top - fBottom) / (1 + static_cast<FX_FLOAT>(cos(FX_PI / 5.0f)));
+ float fBottom = pRtSign->bottom();
+ float fRadius =
+ (pRtSign->top - fBottom) / (1 + static_cast<float>(cos(FX_PI / 5.0f)));
CFX_PointF ptCenter((pRtSign->left + pRtSign->right()) / 2.0f,
(pRtSign->top + fBottom) / 2.0f);
CFX_PointF points[5];
- FX_FLOAT fAngel = FX_PI / 10.0f;
+ float fAngel = FX_PI / 10.0f;
for (int32_t i = 0; i < 5; i++) {
points[i] =
- ptCenter + CFX_PointF(fRadius * static_cast<FX_FLOAT>(cos(fAngel)),
- fRadius * static_cast<FX_FLOAT>(sin(fAngel)));
+ ptCenter + CFX_PointF(fRadius * static_cast<float>(cos(fAngel)),
+ fRadius * static_cast<float>(sin(fAngel)));
fAngel += FX_PI * 2 / 5.0f;
}
@@ -216,13 +216,13 @@ void CFWL_CheckBoxTP::SetThemeData() {
m_pThemeData->clrSignNeutralPressed = ArgbEncode(255, 28, 134, 26);
}
-void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) {
+void CFWL_CheckBoxTP::InitCheckPath(float fCheckLen) {
if (!m_pCheckPath) {
m_pCheckPath = pdfium::MakeUnique<CFX_Path>();
- FX_FLOAT fWidth = kSignPath;
- FX_FLOAT fHeight = -kSignPath;
- FX_FLOAT fBottom = kSignPath;
+ float fWidth = kSignPath;
+ float fHeight = -kSignPath;
+ float fBottom = kSignPath;
CFX_PointF pt1(fWidth / 15.0f, fBottom + fHeight * 2 / 5.0f);
CFX_PointF pt2(fWidth / 4.5f, fBottom + fHeight / 16.0f);
CFX_PointF pt3(fWidth / 3.0f, fBottom);
@@ -262,7 +262,7 @@ void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) {
p2 = CFX_PointF(pt15.x - pt1.x, pt15.y - pt1.y) * FX_BEZIER;
m_pCheckPath->BezierTo(pt5 + p1, pt1 + p2, pt1);
- FX_FLOAT fScale = fCheckLen / kSignPath;
+ float fScale = fCheckLen / kSignPath;
CFX_Matrix mt(1, 0, 0, 1, 0, 0);
mt.Scale(fScale, fScale);
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index 979b970b39..1070b12598 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -65,7 +65,7 @@ class CFWL_CheckBoxTP : public CFWL_WidgetTP {
FX_ARGB argbFill,
CFX_Matrix* pMatrix);
- void InitCheckPath(FX_FLOAT fCheckLen);
+ void InitCheckPath(float fCheckLen);
std::unique_ptr<CKBThemeData> m_pThemeData;
std::unique_ptr<CFX_Path> m_pCheckPath;
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 43160177d7..ebc23bf129 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -22,7 +22,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (CFWL_Part::CombTextLine == pParams->m_iPart) {
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget);
FX_ARGB cr = 0xFF000000;
- FX_FLOAT fWidth = 1.0f;
+ float fWidth = 1.0f;
if (CXFA_Border borderUI = pWidget->GetDataAcc()->GetUIBorder()) {
CXFA_Edge edge = borderUI.GetEdge(0);
if (edge) {
@@ -74,7 +74,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
}
case CFWL_Part::CombTextLine: {
FX_ARGB cr = 0xFF000000;
- FX_FLOAT fWidth = 1.0f;
+ float fWidth = 1.0f;
CFX_Color crLine(cr);
pParams->m_pGraphics->SetStrokeColor(&crLine);
pParams->m_pGraphics->SetLineWidth(fWidth);
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 56268a8507..6bb34d0657 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -29,8 +29,8 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
}
case CFWL_Part::Background: {
CFX_RectF& rect = pParams->m_rtPart;
- FX_FLOAT fRight = rect.right();
- FX_FLOAT fBottom = rect.bottom();
+ float fRight = rect.right();
+ float fBottom = rect.bottom();
CFX_Path strokePath;
strokePath.MoveTo(
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 121d4dea34..bab9a3f3be 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -124,13 +124,13 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
CFX_Path path;
if (bVert) {
- FX_FLOAT fPawLen = kPawLength;
+ float fPawLen = kPawLength;
if (pRect->width / 2 <= fPawLen) {
fPawLen = (pRect->width - 6) / 2;
}
- FX_FLOAT fX = pRect->left + pRect->width / 4;
- FX_FLOAT fY = pRect->top + pRect->height / 2;
+ float fX = pRect->left + pRect->width / 4;
+ float fY = pRect->top + pRect->height / 2;
path.MoveTo(CFX_PointF(fX, fY - 4));
path.LineTo(CFX_PointF(fX + fPawLen, fY - 4));
path.MoveTo(CFX_PointF(fX, fY - 2));
@@ -161,13 +161,13 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics,
pGraphics->SetStrokeColor(&clrDark);
pGraphics->StrokePath(&path, pMatrix);
} else {
- FX_FLOAT fPawLen = kPawLength;
+ float fPawLen = kPawLength;
if (pRect->height / 2 <= fPawLen) {
fPawLen = (pRect->height - 6) / 2;
}
- FX_FLOAT fX = pRect->left + pRect->width / 2;
- FX_FLOAT fY = pRect->top + pRect->height / 4;
+ float fX = pRect->left + pRect->width / 2;
+ float fY = pRect->top + pRect->height / 4;
path.MoveTo(CFX_PointF(fX - 4, fY));
path.LineTo(CFX_PointF(fX - 4, fY + fPawLen));
path.MoveTo(CFX_PointF(fX - 2, fY));
@@ -212,8 +212,8 @@ void CFWL_ScrollBarTP::DrawTrack(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_Color colorLine(ArgbEncode(255, 238, 237, 229));
CFX_Path path;
- FX_FLOAT fRight = pRect->right();
- FX_FLOAT fBottom = pRect->bottom();
+ float fRight = pRect->right();
+ float fBottom = pRect->bottom();
if (bVert) {
path.AddRectangle(pRect->left, pRect->top, 1, pRect->height);
path.AddRectangle(fRight - 1, pRect->top, 1, pRect->height);
@@ -226,10 +226,10 @@ void CFWL_ScrollBarTP::DrawTrack(CFX_Graphics* pGraphics,
path.Clear();
path.AddRectangle(pRect->left + 1, pRect->top, pRect->width - 2,
pRect->height);
- FX_FLOAT x1 = bVert ? pRect->left + 1 : pRect->left;
- FX_FLOAT y1 = bVert ? pRect->top : pRect->top + 1;
- FX_FLOAT x2 = bVert ? fRight - 1 : pRect->left;
- FX_FLOAT y2 = bVert ? pRect->top : fBottom - 1;
+ float x1 = bVert ? pRect->left + 1 : pRect->left;
+ float y1 = bVert ? pRect->top : pRect->top + 1;
+ float x2 = bVert ? fRight - 1 : pRect->left;
+ float y2 = bVert ? pRect->top : fBottom - 1;
pGraphics->RestoreGraphState();
DrawAxialShading(pGraphics, x1, y1, x2, y2, m_pThemeData->clrTrackBKStart,
m_pThemeData->clrTrackBKEnd, &path, FXFILL_WINDING, pMatrix);
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index fbcbcffb85..6ce86fb269 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -138,10 +138,10 @@ void CFWL_WidgetTP::FillSoildRect(CFX_Graphics* pGraphics,
}
void CFWL_WidgetTP::DrawAxialShading(CFX_Graphics* pGraphics,
- FX_FLOAT fx1,
- FX_FLOAT fy1,
- FX_FLOAT fx2,
- FX_FLOAT fy2,
+ float fx1,
+ float fy1,
+ float fx2,
+ float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
CFX_Path* path,
@@ -170,7 +170,7 @@ void CFWL_WidgetTP::DrawFocus(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_Color cr(0xFF000000);
pGraphics->SetStrokeColor(&cr);
- FX_FLOAT DashPattern[2] = {1, 1};
+ float DashPattern[2] = {1, 1};
pGraphics->SetLineDash(0.0f, DashPattern, 2);
CFX_Path path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
@@ -185,10 +185,10 @@ void CFWL_WidgetTP::DrawArrow(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
bool bVert =
(eDict == FWLTHEME_DIRECTION_Up || eDict == FWLTHEME_DIRECTION_Down);
- FX_FLOAT fLeft =
- (FX_FLOAT)(((pRect->width - (bVert ? 9 : 6)) / 2 + pRect->left) + 0.5);
- FX_FLOAT fTop =
- (FX_FLOAT)(((pRect->height - (bVert ? 6 : 9)) / 2 + pRect->top) + 0.5);
+ float fLeft =
+ (float)(((pRect->width - (bVert ? 9 : 6)) / 2 + pRect->left) + 0.5);
+ float fTop =
+ (float)(((pRect->height - (bVert ? 6 : 9)) / 2 + pRect->top) + 0.5);
CFX_Path path;
switch (eDict) {
case FWLTHEME_DIRECTION_Down: {
@@ -240,8 +240,8 @@ void CFWL_WidgetTP::DrawBtn(CFX_Graphics* pGraphics,
CFX_Path path;
InitializeArrowColorData();
- FX_FLOAT fRight = pRect->right();
- FX_FLOAT fBottom = pRect->bottom();
+ float fRight = pRect->right();
+ float fBottom = pRect->bottom();
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
DrawAxialShading(pGraphics, pRect->left, pRect->top, fRight, fBottom,
m_pColorData->clrStart[eState - 1],
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index c81950793a..730a39cd17 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -66,10 +66,10 @@ class CFWL_WidgetTP {
const CFX_RectF* pRect,
CFX_Matrix* pMatrix = nullptr);
void DrawAxialShading(CFX_Graphics* pGraphics,
- FX_FLOAT fx1,
- FX_FLOAT fy1,
- FX_FLOAT fx2,
- FX_FLOAT fy2,
+ float fx1,
+ float fy1,
+ float fx2,
+ float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
CFX_Path* path,