summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Button.cpp5
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Caret.cpp31
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp65
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp75
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp51
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_IconList.cpp41
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp12
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp43
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp59
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp123
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp304
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp10
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Utils.cpp351
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp90
16 files changed, 613 insertions, 663 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Button.cpp b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
index 2c6c36c047..5c78383380 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Button.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
@@ -21,8 +21,7 @@ void CPWL_Button::OnCreate(PWL_CREATEPARAM& cp) {
cp.eCursorType = FXCT_HAND;
}
-FX_BOOL CPWL_Button::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_Button::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
m_bMouseDown = TRUE;
@@ -31,7 +30,7 @@ FX_BOOL CPWL_Button::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_Button::OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_Button::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
diff --git a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
index 320b2bf62f..75c951068a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
@@ -24,14 +24,14 @@ CFX_ByteString CPWL_Caret::GetClassName() const {
}
void CPWL_Caret::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
- GetCaretApp(sAppStream, CFX_FloatPoint(0.0f, 0.0f));
+ GetCaretApp(sAppStream, CPDF_Point(0.0f, 0.0f));
}
void CPWL_Caret::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
if (IsVisible() && m_bFlash) {
- CFX_FloatRect rcRect = GetCaretRect();
- CFX_FloatRect rcClip = GetClipRect();
+ CPDF_Rect rcRect = GetCaretRect();
+ CPDF_Rect rcClip = GetClipRect();
CFX_PathData path;
@@ -65,12 +65,12 @@ void CPWL_Caret::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
void CPWL_Caret::GetCaretApp(CFX_ByteTextBuf& sAppStream,
- const CFX_FloatPoint& ptOffset) {
+ const CPDF_Point& ptOffset) {
if (IsVisible() && m_bFlash) {
CFX_ByteTextBuf sCaret;
- CFX_FloatRect rcRect = GetCaretRect();
- CFX_FloatRect rcClip = GetClipRect();
+ CPDF_Rect rcRect = GetCaretRect();
+ CPDF_Rect rcClip = GetClipRect();
rcRect = CPWL_Utils::OffsetRect(rcRect, ptOffset.x, ptOffset.y);
rcClip = CPWL_Utils::OffsetRect(rcClip, ptOffset.x, ptOffset.y);
@@ -90,7 +90,7 @@ void CPWL_Caret::GetCaretApp(CFX_ByteTextBuf& sAppStream,
}
CFX_ByteString CPWL_Caret::GetCaretAppearanceStream(
- const CFX_FloatPoint& ptOffset) {
+ const CPDF_Point& ptOffset) {
CFX_ByteTextBuf sCaret;
GetCaretApp(sCaret, ptOffset);
return sCaret.GetByteString();
@@ -105,14 +105,13 @@ void CPWL_Caret::TimerProc() {
}
}
-CFX_FloatRect CPWL_Caret::GetCaretRect() const {
- return CFX_FloatRect(m_ptFoot.x, m_ptFoot.y, m_ptHead.x + m_fWidth,
- m_ptHead.y);
+CPDF_Rect CPWL_Caret::GetCaretRect() const {
+ return CPDF_Rect(m_ptFoot.x, m_ptFoot.y, m_ptHead.x + m_fWidth, m_ptHead.y);
}
void CPWL_Caret::SetCaret(FX_BOOL bVisible,
- const CFX_FloatPoint& ptHead,
- const CFX_FloatPoint& ptFoot) {
+ const CPDF_Point& ptHead,
+ const CPDF_Point& ptFoot) {
if (bVisible) {
if (IsVisible()) {
if (m_ptHead.x != ptHead.x || m_ptHead.y != ptHead.y ||
@@ -136,8 +135,8 @@ void CPWL_Caret::SetCaret(FX_BOOL bVisible,
Move(m_rcInvalid, FALSE, TRUE);
}
} else {
- m_ptHead = CFX_FloatPoint(0, 0);
- m_ptFoot = CFX_FloatPoint(0, 0);
+ m_ptHead = CPDF_Point(0, 0);
+ m_ptFoot = CPDF_Point(0, 0);
m_bFlash = FALSE;
if (IsVisible()) {
@@ -147,9 +146,9 @@ void CPWL_Caret::SetCaret(FX_BOOL bVisible,
}
}
-void CPWL_Caret::InvalidateRect(CFX_FloatRect* pRect) {
+void CPWL_Caret::InvalidateRect(CPDF_Rect* pRect) {
if (pRect) {
- CFX_FloatRect rcRefresh = CPWL_Utils::InflateRect(*pRect, 0.5f);
+ CPDF_Rect rcRefresh = CPWL_Utils::InflateRect(*pRect, 0.5f);
rcRefresh.top += 1;
rcRefresh.bottom -= 1;
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index bdc6724f65..7582ae412b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -20,8 +20,7 @@
#define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb)))
#define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb))
-FX_BOOL CPWL_CBListBox::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_CBListBox::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (m_bMouseDown) {
@@ -111,19 +110,19 @@ FX_BOOL CPWL_CBListBox::OnCharWithExit(FX_WORD nChar,
void CPWL_CBButton::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Wnd::GetThisAppearanceStream(sAppStream);
- CFX_FloatRect rectWnd = CPWL_Wnd::GetWindowRect();
+ CPDF_Rect rectWnd = CPWL_Wnd::GetWindowRect();
if (IsVisible() && !rectWnd.IsEmpty()) {
CFX_ByteTextBuf sButton;
- CFX_FloatPoint ptCenter = GetCenterPoint();
+ CPDF_Point ptCenter = GetCenterPoint();
- CFX_FloatPoint pt1(ptCenter.x - PWL_CBBUTTON_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt2(ptCenter.x + PWL_CBBUTTON_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt3(ptCenter.x,
- ptCenter.y - PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt1(ptCenter.x - PWL_CBBUTTON_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt2(ptCenter.x + PWL_CBBUTTON_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt3(ptCenter.x,
+ ptCenter.y - PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
if (IsFloatBigger(rectWnd.right - rectWnd.left,
PWL_CBBUTTON_TRIANGLE_HALFLEN * 2) &&
@@ -144,17 +143,17 @@ void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
- CFX_FloatRect rectWnd = CPWL_Wnd::GetWindowRect();
+ CPDF_Rect rectWnd = CPWL_Wnd::GetWindowRect();
if (IsVisible() && !rectWnd.IsEmpty()) {
- CFX_FloatPoint ptCenter = GetCenterPoint();
+ CPDF_Point ptCenter = GetCenterPoint();
- CFX_FloatPoint pt1(ptCenter.x - PWL_CBBUTTON_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt2(ptCenter.x + PWL_CBBUTTON_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt3(ptCenter.x,
- ptCenter.y - PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt1(ptCenter.x - PWL_CBBUTTON_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt2(ptCenter.x + PWL_CBBUTTON_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt3(ptCenter.x,
+ ptCenter.y - PWL_CBBUTTON_TRIANGLE_HALFLEN * 0.5f);
if (IsFloatBigger(rectWnd.right - rectWnd.left,
PWL_CBBUTTON_TRIANGLE_HALFLEN * 2) &&
@@ -176,8 +175,7 @@ void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
-FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_CBButton::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
SetCapture();
@@ -190,8 +188,7 @@ FX_BOOL CPWL_CBButton::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_CBButton::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_CBButton::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
@@ -300,7 +297,7 @@ void CPWL_ComboBox::CreateEdit(const PWL_CREATEPARAM& cp) {
if (!HasFlag(PCBS_ALLOWCUSTOMTEXT))
ecp.dwFlags |= PWS_READONLY;
- ecp.rcRectWnd = CFX_FloatRect(0, 0, 0, 0);
+ ecp.rcRectWnd = CPDF_Rect(0, 0, 0, 0);
ecp.dwBorderWidth = 0;
ecp.nBorderStyle = PBS_SOLID;
@@ -336,7 +333,7 @@ void CPWL_ComboBox::CreateListBox(const PWL_CREATEPARAM& cp) {
lcp.nBorderStyle = PBS_SOLID;
lcp.dwBorderWidth = 1;
lcp.eCursorType = FXCT_ARROW;
- lcp.rcRectWnd = CFX_FloatRect(0, 0, 0, 0);
+ lcp.rcRectWnd = CPDF_Rect(0, 0, 0, 0);
if (cp.dwFlags & PWS_AUTOFONTSIZE)
lcp.fFontSize = PWLCB_DEFAULTFONTSIZE;
@@ -354,13 +351,13 @@ void CPWL_ComboBox::CreateListBox(const PWL_CREATEPARAM& cp) {
}
void CPWL_ComboBox::RePosChildWnd() {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
if (m_bPopup) {
- CFX_FloatRect rclient = GetClientRect();
- CFX_FloatRect rcButton = rclient;
- CFX_FloatRect rcEdit = rcClient;
- CFX_FloatRect rcList = CPWL_Wnd::GetWindowRect();
+ CPDF_Rect rclient = GetClientRect();
+ CPDF_Rect rcButton = rclient;
+ CPDF_Rect rcEdit = rcClient;
+ CPDF_Rect rcList = CPWL_Wnd::GetWindowRect();
FX_FLOAT fOldWindowHeight = m_rcOldWindow.Height();
FX_FLOAT fOldClientHeight = fOldWindowHeight - GetBorderWidth() * 2;
@@ -422,7 +419,7 @@ void CPWL_ComboBox::RePosChildWnd() {
m_pList->ScrollToListItem(m_nSelectItem);
}
} else {
- CFX_FloatRect rcButton = rcClient;
+ CPDF_Rect rcButton = rcClient;
rcButton.left = rcButton.right - PWL_COMBOBOX_BUTTON_WIDTH;
@@ -432,7 +429,7 @@ void CPWL_ComboBox::RePosChildWnd() {
if (m_pButton)
m_pButton->Move(rcButton, TRUE, FALSE);
- CFX_FloatRect rcEdit = rcClient;
+ CPDF_Rect rcEdit = rcClient;
rcEdit.right = rcButton.left - 1.0f;
if (rcEdit.left < rcClient.left)
@@ -454,8 +451,8 @@ void CPWL_ComboBox::SelectAll() {
m_pEdit->SelectAll();
}
-CFX_FloatRect CPWL_ComboBox::GetFocusRect() const {
- return CFX_FloatRect();
+CPDF_Rect CPWL_ComboBox::GetFocusRect() const {
+ return CPDF_Rect();
}
void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
@@ -488,7 +485,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
if (IsFloatBigger(fPopupRet, 0.0f)) {
m_bPopup = bPopup;
- CFX_FloatRect rcWindow = CPWL_Wnd::GetWindowRect();
+ CPDF_Rect rcWindow = CPWL_Wnd::GetWindowRect();
m_rcOldWindow = rcWindow;
switch (nWhere) {
default:
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 0b3887b413..7834473ded 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -73,10 +73,10 @@ void CPWL_Edit::SetText(const FX_WCHAR* csText) {
void CPWL_Edit::RePosChildWnd() {
if (CPWL_ScrollBar* pVSB = GetVScrollBar()) {
- CFX_FloatRect rcWindow = m_rcOldWindow;
- CFX_FloatRect rcVScroll =
- CFX_FloatRect(rcWindow.right, rcWindow.bottom,
- rcWindow.right + PWL_SCROLLBAR_WIDTH, rcWindow.top);
+ CPDF_Rect rcWindow = m_rcOldWindow;
+ CPDF_Rect rcVScroll =
+ CPDF_Rect(rcWindow.right, rcWindow.bottom,
+ rcWindow.right + PWL_SCROLLBAR_WIDTH, rcWindow.top);
pVSB->Move(rcVScroll, TRUE, FALSE);
}
@@ -87,8 +87,8 @@ void CPWL_Edit::RePosChildWnd() {
CPWL_EditCtrl::RePosChildWnd();
}
-CFX_FloatRect CPWL_Edit::GetClientRect() const {
- CFX_FloatRect rcClient = CPWL_Utils::DeflateRect(
+CPDF_Rect CPWL_Edit::GetClientRect() const {
+ CPDF_Rect rcClient = CPWL_Utils::DeflateRect(
GetWindowRect(), (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
if (CPWL_ScrollBar* pVSB = GetVScrollBar()) {
@@ -234,7 +234,7 @@ void CPWL_Edit::SetParamByFlag() {
m_pEdit->EnableUndo(HasFlag(PES_UNDO));
if (HasFlag(PES_TEXTOVERFLOW)) {
- SetClipRect(CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f));
+ SetClipRect(CPDF_Rect(0.0f, 0.0f, 0.0f, 0.0f));
m_pEdit->SetTextOverflow(TRUE, FALSE);
} else {
if (m_pEditCaret) {
@@ -251,7 +251,7 @@ void CPWL_Edit::SetParamByFlag() {
void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Wnd::GetThisAppearanceStream(sAppStream);
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
CFX_ByteTextBuf sLine;
int32_t nCharArray = m_pEdit->GetCharArray();
@@ -299,7 +299,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CFX_ByteTextBuf sText;
- CFX_FloatPoint ptOffset = CFX_FloatPoint(0.0f, 0.0f);
+ CPDF_Point ptOffset = CPDF_Point(0.0f, 0.0f);
CPVT_WordRange wrWhole = m_pEdit->GetWholeWordRange();
CPVT_WordRange wrSelect = GetSelectWordRange();
@@ -355,7 +355,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
}
if (sText.GetLength() > 0) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
sAppStream << "q\n/Tx BMC\n";
if (!HasFlag(PES_TEXTOVERFLOW))
@@ -373,7 +373,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
CFX_ByteTextBuf sLine;
int32_t nCharArray = m_pEdit->GetCharArray();
@@ -441,7 +441,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
- CFX_FloatRect rcClip;
+ CPDF_Rect rcClip;
CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange();
CPVT_WordRange* pRange = NULL;
@@ -454,16 +454,16 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
pDevice, pUser2Device, m_pEdit,
CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()),
CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor(), GetTransparency()),
- rcClip, CFX_FloatPoint(0.0f, 0.0f), pRange, pSysHandler, m_pFormFiller);
+ rcClip, CPDF_Point(0.0f, 0.0f), pRange, pSysHandler, m_pFormFiller);
if (HasFlag(PES_SPELLCHECK)) {
CPWL_Utils::DrawEditSpellCheck(pDevice, pUser2Device, m_pEdit, rcClip,
- CFX_FloatPoint(0.0f, 0.0f), pRange,
+ CPDF_Point(0.0f, 0.0f), pRange,
GetCreationParam().pSpellCheck);
}
}
-FX_BOOL CPWL_Edit::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (HasFlag(PES_TEXTOVERFLOW) || ClientHitTest(point)) {
@@ -479,8 +479,7 @@ FX_BOOL CPWL_Edit::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) {
return TRUE;
}
-FX_BOOL CPWL_Edit::OnLButtonDblClk(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDblClk(point, nFlag);
if (HasFlag(PES_TEXTOVERFLOW) || ClientHitTest(point)) {
@@ -499,7 +498,7 @@ FX_BOOL CPWL_Edit::OnLButtonDblClk(const CFX_FloatPoint& point,
#define WM_PWLEDIT_SELECTALL 0x07
#define WM_PWLEDIT_SUGGEST 0x08
-FX_BOOL CPWL_Edit::OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
if (m_bMouseDown)
return FALSE;
@@ -522,7 +521,7 @@ FX_BOOL CPWL_Edit::OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) {
return FALSE;
std::vector<CFX_ByteString> sSuggestWords;
- CFX_FloatPoint ptPopup = point;
+ CPDF_Point ptPopup = point;
if (!IsReadOnly()) {
if (HasFlag(PES_SPELLCHECK) && !swLatin.IsEmpty()) {
@@ -685,7 +684,7 @@ void CPWL_Edit::OnKillFocus() {
ShowVScrollBar(FALSE);
m_pEdit->SelectNone();
- SetCaret(FALSE, CFX_FloatPoint(0.0f, 0.0f), CFX_FloatPoint(0.0f, 0.0f));
+ SetCaret(FALSE, CPDF_Point(0.0f, 0.0f), CPDF_Point(0.0f, 0.0f));
SetCharSet(0);
@@ -711,7 +710,7 @@ void CPWL_Edit::SetLineLeading(FX_FLOAT fLineLeading,
}
CFX_ByteString CPWL_Edit::GetSelectAppearanceStream(
- const CFX_FloatPoint& ptOffset) const {
+ const CPDF_Point& ptOffset) const {
CPVT_WordRange wr = GetSelectWordRange();
return CPWL_Utils::GetEditSelAppStream(m_pEdit, ptOffset, &wr);
}
@@ -733,7 +732,7 @@ CPVT_WordRange CPWL_Edit::GetSelectWordRange() const {
}
CFX_ByteString CPWL_Edit::GetTextAppearanceStream(
- const CFX_FloatPoint& ptOffset) const {
+ const CPDF_Point& ptOffset) const {
CFX_ByteTextBuf sRet;
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
@@ -746,24 +745,23 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream(
}
CFX_ByteString CPWL_Edit::GetCaretAppearanceStream(
- const CFX_FloatPoint& ptOffset) const {
+ const CPDF_Point& ptOffset) const {
if (m_pEditCaret)
return m_pEditCaret->GetCaretAppearanceStream(ptOffset);
return CFX_ByteString();
}
-CFX_FloatPoint CPWL_Edit::GetWordRightBottomPoint(
- const CPVT_WordPlace& wpWord) {
- CFX_FloatPoint pt(0.0f, 0.0f);
+CPDF_Point CPWL_Edit::GetWordRightBottomPoint(const CPVT_WordPlace& wpWord) {
+ CPDF_Point pt(0.0f, 0.0f);
if (IFX_Edit_Iterator* pIterator = m_pEdit->GetIterator()) {
CPVT_WordPlace wpOld = pIterator->GetAt();
pIterator->SetAt(wpWord);
CPVT_Word word;
if (pIterator->GetWord(word)) {
- pt = CFX_FloatPoint(word.ptWord.x + word.fWidth,
- word.ptWord.y + word.fDescent);
+ pt = CPDF_Point(word.ptWord.x + word.fWidth,
+ word.ptWord.y + word.fDescent);
}
pIterator->SetAt(wpOld);
@@ -777,13 +775,13 @@ FX_BOOL CPWL_Edit::IsTextFull() const {
}
FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont,
- const CFX_FloatRect& rcPlate,
+ const CPDF_Rect& rcPlate,
int32_t nCharArray) {
if (pFont && !pFont->IsStandardFont()) {
FX_RECT rcBBox;
pFont->GetFontBBox(rcBBox);
- CFX_FloatRect rcCell = rcPlate;
+ CPDF_Rect rcCell = rcPlate;
FX_FLOAT xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width();
FX_FLOAT ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height();
@@ -820,8 +818,8 @@ void CPWL_Edit::ReplaceSel(const FX_WCHAR* csText) {
m_pEdit->InsertText(csText);
}
-CFX_FloatRect CPWL_Edit::GetFocusRect() const {
- return CFX_FloatRect();
+CPDF_Rect CPWL_Edit::GetFocusRect() const {
+ return CPDF_Rect();
}
void CPWL_Edit::ShowVScrollBar(FX_BOOL bShow) {
@@ -829,7 +827,7 @@ void CPWL_Edit::ShowVScrollBar(FX_BOOL bShow) {
if (bShow) {
if (!pScroll->IsVisible()) {
pScroll->SetVisible(TRUE);
- CFX_FloatRect rcWindow = GetWindowRect();
+ CPDF_Rect rcWindow = GetWindowRect();
m_rcOldWindow = rcWindow;
rcWindow.right += PWL_SCROLLBAR_WIDTH;
Move(rcWindow, TRUE, TRUE);
@@ -978,10 +976,10 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
}
FX_BOOL CPWL_Edit::OnMouseWheel(short zDelta,
- const CFX_FloatPoint& point,
+ const CPDF_Point& point,
FX_DWORD nFlag) {
if (HasFlag(PES_MULTILINE)) {
- CFX_FloatPoint ptScroll = GetScrollPos();
+ CPDF_Point ptScroll = GetScrollPos();
if (zDelta > 0) {
ptScroll.y += GetFontSize();
@@ -1096,8 +1094,7 @@ CPVT_WordRange CPWL_Edit::CombineWordRange(const CPVT_WordRange& wr1,
return wrRet;
}
-CPVT_WordRange CPWL_Edit::GetLatinWordsRange(
- const CFX_FloatPoint& point) const {
+CPVT_WordRange CPWL_Edit::GetLatinWordsRange(const CPDF_Point& point) const {
return GetSameWordsRange(m_pEdit->SearchWordPlace(point), TRUE, FALSE);
}
@@ -1170,7 +1167,7 @@ CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace& place,
void CPWL_Edit::GeneratePageObjects(
CPDF_PageObjectHolder* pObjectHolder,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Point& ptOffset,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) {
IFX_Edit::GeneratePageObjects(
pObjectHolder, m_pEdit, ptOffset, NULL,
@@ -1179,7 +1176,7 @@ void CPWL_Edit::GeneratePageObjects(
}
void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder,
- const CFX_FloatPoint& ptOffset) {
+ const CPDF_Point& ptOffset) {
CFX_ArrayTemplate<CPDF_TextObject*> ObjArray;
IFX_Edit::GeneratePageObjects(
pObjectHolder, m_pEdit, ptOffset, NULL,
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index 10b5d6c04f..c505c7e780 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -47,8 +47,8 @@ void CPWL_EditCtrl::OnCreated() {
FX_BOOL CPWL_EditCtrl::IsWndHorV() {
CFX_Matrix mt = GetWindowMatrix();
- CFX_FloatPoint point1(0, 1);
- CFX_FloatPoint point2(1, 1);
+ CPDF_Point point1(0, 1);
+ CPDF_Point point2(1, 1);
mt.Transform(point1.x, point1.y);
mt.Transform(point2.x, point2.y);
@@ -100,8 +100,7 @@ void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd,
FX_FLOAT fPos = *(FX_FLOAT*)lParam;
switch (wParam) {
case SBT_VSCROLL:
- m_pEdit->SetScrollPos(
- CFX_FloatPoint(m_pEdit->GetScrollPos().x, fPos));
+ m_pEdit->SetScrollPos(CPDF_Point(m_pEdit->GetScrollPos().x, fPos));
break;
}
} break;
@@ -128,7 +127,7 @@ void CPWL_EditCtrl::CreateEditCaret(const PWL_CREATEPARAM& cp) {
ecp.dwFlags = PWS_CHILD | PWS_NOREFRESHCLIP;
ecp.dwBorderWidth = 0;
ecp.nBorderStyle = PBS_SOLID;
- ecp.rcRectWnd = CFX_FloatRect(0, 0, 0, 0);
+ ecp.rcRectWnd = CPDF_Rect(0, 0, 0, 0);
m_pEditCaret->Create(ecp);
}
@@ -291,8 +290,7 @@ FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
return TRUE;
}
-FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (ClientHitTest(point)) {
@@ -308,8 +306,7 @@ FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (m_bMouseDown) {
@@ -324,8 +321,7 @@ FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_EditCtrl::OnMouseMove(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnMouseMove(point, nFlag);
if (m_bMouseDown)
@@ -334,12 +330,12 @@ FX_BOOL CPWL_EditCtrl::OnMouseMove(const CFX_FloatPoint& point,
return TRUE;
}
-CFX_FloatRect CPWL_EditCtrl::GetContentRect() const {
+CPDF_Rect CPWL_EditCtrl::GetContentRect() const {
return m_pEdit->GetContentRect();
}
void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible) {
- CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0);
+ CPDF_Point ptHead(0, 0), ptFoot(0, 0);
if (bVisible) {
GetCaretInfo(ptHead, ptFoot);
@@ -349,8 +345,7 @@ void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible) {
IOnSetCaret(bVisible, ptHead, ptFoot, wpTemp);
}
-void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead,
- CFX_FloatPoint& ptFoot) const {
+void CPWL_EditCtrl::GetCaretInfo(CPDF_Point& ptHead, CPDF_Point& ptFoot) const {
if (IFX_Edit_Iterator* pIterator = m_pEdit->GetIterator()) {
pIterator->SetAt(m_pEdit->GetCaret());
CPVT_Word word;
@@ -370,7 +365,7 @@ void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead,
}
void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const {
- CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0);
+ CPDF_Point ptHead(0, 0), ptFoot(0, 0);
GetCaretInfo(ptHead, ptFoot);
@@ -378,8 +373,8 @@ void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const {
}
void CPWL_EditCtrl::SetCaret(FX_BOOL bVisible,
- const CFX_FloatPoint& ptHead,
- const CFX_FloatPoint& ptFoot) {
+ const CPDF_Point& ptHead,
+ const CPDF_Point& ptFoot) {
if (m_pEditCaret) {
if (!IsFocused() || m_pEdit->IsSelected())
bVisible = FALSE;
@@ -438,16 +433,16 @@ int32_t CPWL_EditCtrl::GetTotalWords() const {
return 0;
}
-void CPWL_EditCtrl::SetScrollPos(const CFX_FloatPoint& point) {
+void CPWL_EditCtrl::SetScrollPos(const CPDF_Point& point) {
if (m_pEdit)
m_pEdit->SetScrollPos(point);
}
-CFX_FloatPoint CPWL_EditCtrl::GetScrollPos() const {
+CPDF_Point CPWL_EditCtrl::GetScrollPos() const {
if (m_pEdit)
return m_pEdit->GetScrollPos();
- return CFX_FloatPoint(0.0f, 0.0f);
+ return CPDF_Point(0.0f, 0.0f);
}
CPDF_Font* CPWL_EditCtrl::GetCaretFont() const {
@@ -575,8 +570,8 @@ void CPWL_EditCtrl::IOnSetScrollPosY(FX_FLOAT fy) {
}
void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible,
- const CFX_FloatPoint& ptHead,
- const CFX_FloatPoint& ptFoot,
+ const CPDF_Point& ptHead,
+ const CPDF_Point& ptFoot,
const CPVT_WordPlace& place) {
PWL_CARET_INFO cInfo;
cInfo.bVisible = bVisible;
@@ -589,7 +584,7 @@ void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible,
void CPWL_EditCtrl::IOnCaretChange(const CPVT_SecProps& secProps,
const CPVT_WordProps& wordProps) {}
-void CPWL_EditCtrl::IOnContentChange(const CFX_FloatRect& rcContent) {
+void CPWL_EditCtrl::IOnContentChange(const CPDF_Rect& rcContent) {
if (IsValid()) {
if (m_pEditNotify) {
m_pEditNotify->OnContentChange(rcContent);
@@ -597,7 +592,7 @@ void CPWL_EditCtrl::IOnContentChange(const CFX_FloatRect& rcContent) {
}
}
-void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) {
+void CPWL_EditCtrl::IOnInvalidateRect(CPDF_Rect* pRect) {
InvalidateRect(pRect);
}
@@ -605,13 +600,13 @@ int32_t CPWL_EditCtrl::GetCharSet() const {
return m_nCharSet < 0 ? DEFAULT_CHARSET : m_nCharSet;
}
-void CPWL_EditCtrl::GetTextRange(const CFX_FloatRect& rect,
+void CPWL_EditCtrl::GetTextRange(const CPDF_Rect& rect,
int32_t& nStartChar,
int32_t& nEndChar) const {
nStartChar = m_pEdit->WordPlaceToWordIndex(
- m_pEdit->SearchWordPlace(CFX_FloatPoint(rect.left, rect.top)));
+ m_pEdit->SearchWordPlace(CPDF_Point(rect.left, rect.top)));
nEndChar = m_pEdit->WordPlaceToWordIndex(
- m_pEdit->SearchWordPlace(CFX_FloatPoint(rect.right, rect.bottom)));
+ m_pEdit->SearchWordPlace(CPDF_Point(rect.right, rect.bottom)));
}
CFX_WideString CPWL_EditCtrl::GetText(int32_t& nStartChar,
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 1bfa1a6d3a..56c22d1bbd 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -16,7 +16,7 @@ CFX_ByteString CPWL_Image::GetImageAppStream() {
CFX_ByteTextBuf sAppStream;
CFX_ByteString sAlias = GetImageAlias();
- CFX_FloatRect rcPlate = GetClientRect();
+ CPDF_Rect rcPlate = GetClientRect();
CFX_Matrix mt;
mt.SetReverse(GetImageMatrix());
@@ -60,7 +60,7 @@ void CPWL_Image::GetImageSize(FX_FLOAT& fWidth, FX_FLOAT& fHeight) {
if (m_pPDFStream) {
if (CPDF_Dictionary* pDict = m_pPDFStream->GetDict()) {
- CFX_FloatRect rect = pDict->GetRectBy("BBox");
+ CPDF_Rect rect = pDict->GetRectBy("BBox");
fWidth = rect.right - rect.left;
fHeight = rect.top - rect.bottom;
@@ -157,7 +157,7 @@ void CPWL_Icon::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) {
FX_FLOAT fImageWidth, fImageHeight;
FX_FLOAT fPlateWidth, fPlateHeight;
- CFX_FloatRect rcPlate = GetClientRect();
+ CPDF_Rect rcPlate = GetClientRect();
fPlateWidth = rcPlate.right - rcPlate.left;
fPlateHeight = rcPlate.top - rcPlate.bottom;
@@ -213,7 +213,7 @@ void CPWL_Icon::GetImageOffset(FX_FLOAT& x, FX_FLOAT& y) {
FX_FLOAT fImageFactHeight = fImageHeight * fVScale;
FX_FLOAT fPlateWidth, fPlateHeight;
- CFX_FloatRect rcPlate = GetClientRect();
+ CPDF_Rect rcPlate = GetClientRect();
fPlateWidth = rcPlate.right - rcPlate.left;
fPlateHeight = rcPlate.top - rcPlate.bottom;
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
index 7dc8ba9f44..c6849d0683 100644
--- a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
@@ -33,7 +33,7 @@ FX_FLOAT CPWL_IconList_Item::GetItemHeight(FX_FLOAT fLimitWidth) {
void CPWL_IconList_Item::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
if (m_bSelected) {
if (IsEnabled()) {
@@ -49,7 +49,7 @@ void CPWL_IconList_Item::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
- CFX_FloatRect rcIcon = rcClient;
+ CPDF_Rect rcIcon = rcClient;
rcIcon.left += PWL_IconList_ITEM_ICON_LEFTMARGIN;
rcIcon.right = rcIcon.left + PWL_IconList_ITEM_WIDTH;
@@ -99,7 +99,7 @@ CFX_WideString CPWL_IconList_Item::GetText() const {
}
void CPWL_IconList_Item::RePosChildWnd() {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
rcClient.left +=
(PWL_IconList_ITEM_ICON_LEFTMARGIN + PWL_IconList_ITEM_WIDTH +
@@ -150,7 +150,7 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM& cp) {
ResetContent(0);
if (CPWL_Wnd* pParent = GetParentWindow()) {
- CFX_FloatRect rcScroll = GetScrollArea();
+ CPDF_Rect rcScroll = GetScrollArea();
GetScrollPos();
PWL_SCROLL_INFO sInfo;
@@ -164,7 +164,7 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM& cp) {
}
}
-FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CFX_FloatPoint& point,
+FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CPDF_Point& point,
FX_DWORD nFlag) {
SetFocus();
@@ -178,7 +178,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CFX_FloatPoint& point,
+FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CPDF_Point& point,
FX_DWORD nFlag) {
m_bMouseDown = FALSE;
ReleaseCapture();
@@ -186,7 +186,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_IconList_Content::OnMouseMove(const CFX_FloatPoint& point,
+FX_BOOL CPWL_IconList_Content::OnMouseMove(const CPDF_Point& point,
FX_DWORD nFlag) {
if (m_bMouseDown) {
int32_t nItemIndex = FindItemIndex(point);
@@ -218,11 +218,11 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return FALSE;
}
-int32_t CPWL_IconList_Content::FindItemIndex(const CFX_FloatPoint& point) {
+int32_t CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point) {
int32_t nIndex = 0;
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) {
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i)) {
- CFX_FloatRect rcWnd = pChild->ChildToParent(pChild->GetWindowRect());
+ CPDF_Rect rcWnd = pChild->ChildToParent(pChild->GetWindowRect());
if (point.y < rcWnd.top) {
nIndex = i;
@@ -234,14 +234,14 @@ int32_t CPWL_IconList_Content::FindItemIndex(const CFX_FloatPoint& point) {
}
void CPWL_IconList_Content::ScrollToItem(int32_t nItemIndex) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex)) {
- CFX_FloatRect rcOrigin = pItem->GetWindowRect();
- CFX_FloatRect rcWnd = pItem->ChildToParent(rcOrigin);
+ CPDF_Rect rcOrigin = pItem->GetWindowRect();
+ CPDF_Rect rcWnd = pItem->ChildToParent(rcOrigin);
if (!(rcWnd.bottom > rcClient.bottom && rcWnd.top < rcClient.top)) {
- CFX_FloatPoint ptScroll = GetScrollPos();
+ CPDF_Point ptScroll = GetScrollPos();
if (rcWnd.top > rcClient.top) {
ptScroll.y = rcOrigin.top;
@@ -398,7 +398,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd,
}
if (m_pListContent)
- m_pListContent->SetScrollPos(CFX_FloatPoint(0.0f, 0.0f));
+ m_pListContent->SetScrollPos(CPDF_Point(0.0f, 0.0f));
}
pScrollBar->OnNotify(pWnd, PNM_SETSCROLLINFO, wParam, lParam);
@@ -407,8 +407,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd,
return;
case PNM_SCROLLWINDOW:
if (m_pListContent) {
- m_pListContent->SetScrollPos(
- CFX_FloatPoint(0.0f, *(FX_FLOAT*)lParam));
+ m_pListContent->SetScrollPos(CPDF_Point(0.0f, *(FX_FLOAT*)lParam));
m_pListContent->ResetFace();
m_pListContent->InvalidateRect(NULL);
}
@@ -463,14 +462,14 @@ void CPWL_IconList::SetIconFillColor(const CPWL_Color& color) {
}
FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta,
- const CFX_FloatPoint& point,
+ const CPDF_Point& point,
FX_DWORD nFlag) {
- CFX_FloatPoint ptScroll = m_pListContent->GetScrollPos();
- CFX_FloatRect rcScroll = m_pListContent->GetScrollArea();
- CFX_FloatRect rcContents = m_pListContent->GetClientRect();
+ CPDF_Point ptScroll = m_pListContent->GetScrollPos();
+ CPDF_Rect rcScroll = m_pListContent->GetScrollArea();
+ CPDF_Rect rcContents = m_pListContent->GetClientRect();
if (rcScroll.top - rcScroll.bottom > rcContents.Height()) {
- CFX_FloatPoint ptNew = ptScroll;
+ CPDF_Point ptNew = ptScroll;
if (zDelta > 0)
ptNew.y += 30;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index 5f8d2d8685..4f8a0dd8ed 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -29,7 +29,7 @@ void CPWL_Label::OnCreated() {
m_pEdit->Initialize();
if (HasFlag(PES_TEXTOVERFLOW)) {
- SetClipRect(CFX_FloatRect(0.0f, 0.0f, 0.0f, 0.0f));
+ SetClipRect(CPDF_Rect(0.0f, 0.0f, 0.0f, 0.0f));
m_pEdit->SetTextOverflow(TRUE);
}
}
@@ -87,7 +87,7 @@ void CPWL_Label::DrawThisAppearance(CFX_RenderDevice* pDevice,
GetClientRect();
- CFX_FloatRect rcClip;
+ CPDF_Rect rcClip;
CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange();
CPVT_WordRange* pRange = NULL;
@@ -100,7 +100,7 @@ void CPWL_Label::DrawThisAppearance(CFX_RenderDevice* pDevice,
pDevice, pUser2Device, m_pEdit,
CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()),
CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor(), GetTransparency()),
- rcClip, CFX_FloatPoint(0.0f, 0.0f), pRange, pSysHandler, NULL);
+ rcClip, CPDF_Point(0.0f, 0.0f), pRange, pSysHandler, NULL);
}
void CPWL_Label::SetHorzScale(int32_t nHorzScale) {
@@ -111,18 +111,18 @@ void CPWL_Label::SetCharSpace(FX_FLOAT fCharSpace) {
m_pEdit->SetCharSpace(fCharSpace);
}
-CFX_FloatRect CPWL_Label::GetContentRect() const {
+CPDF_Rect CPWL_Label::GetContentRect() const {
return m_pEdit->GetContentRect();
}
void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Wnd::GetThisAppearanceStream(sAppStream);
- sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f));
+ sAppStream << GetTextAppearanceStream(CPDF_Point(0.0f, 0.0f));
}
CFX_ByteString CPWL_Label::GetTextAppearanceStream(
- const CFX_FloatPoint& ptOffset) const {
+ const CPDF_Point& ptOffset) const {
CFX_ByteTextBuf sRet;
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index c8e738a7ca..e3e83f9c7a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -60,7 +60,7 @@ void CPWL_List_Notify::IOnSetScrollPosY(FX_FLOAT fy) {
m_pList->OnNotify(m_pList, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&fy);
}
-void CPWL_List_Notify::IOnInvalidateRect(CFX_FloatRect* pRect) {
+void CPWL_List_Notify::IOnInvalidateRect(CPDF_Rect* pRect) {
m_pList->InvalidateRect(pRect);
}
@@ -109,14 +109,14 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CFX_ByteTextBuf sListItems;
if (m_pList) {
- CFX_FloatRect rcPlate = m_pList->GetPlateRect();
+ CPDF_Rect rcPlate = m_pList->GetPlateRect();
for (int32_t i = 0, sz = m_pList->GetCount(); i < sz; i++) {
- CFX_FloatRect rcItem = m_pList->GetItemRect(i);
+ CPDF_Rect rcItem = m_pList->GetItemRect(i);
if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom)
continue;
- CFX_FloatPoint ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f);
+ CPDF_Point ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f);
if (m_pList->IsItemSelected(i)) {
sListItems << CPWL_Utils::GetRectFillAppStream(
rcItem, PWL_DEFAULT_SELBACKCOLOR);
@@ -140,7 +140,7 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (sListItems.GetLength() > 0) {
CFX_ByteTextBuf sClip;
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
sClip << "q\n";
sClip << rcClient.left << " " << rcClient.bottom << " "
@@ -158,18 +158,18 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
if (m_pList) {
- CFX_FloatRect rcPlate = m_pList->GetPlateRect();
- CFX_FloatRect rcList = GetListRect();
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcPlate = m_pList->GetPlateRect();
+ CPDF_Rect rcList = GetListRect();
+ CPDF_Rect rcClient = GetClientRect();
for (int32_t i = 0, sz = m_pList->GetCount(); i < sz; i++) {
- CFX_FloatRect rcItem = m_pList->GetItemRect(i);
+ CPDF_Rect rcItem = m_pList->GetItemRect(i);
if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom)
continue;
- CFX_FloatPoint ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f);
+ CPDF_Point ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f);
if (IFX_Edit* pEdit = m_pList->GetItemEdit(i)) {
- CFX_FloatRect rcContent = pEdit->GetContentRect();
+ CPDF_Rect rcContent = pEdit->GetContentRect();
if (rcContent.Width() > rcClient.Width())
rcItem.Intersect(rcList);
else
@@ -265,8 +265,7 @@ FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
return TRUE;
}
-FX_BOOL CPWL_ListBox::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (ClientHitTest(point)) {
@@ -281,7 +280,7 @@ FX_BOOL CPWL_ListBox::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_ListBox::OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (m_bMouseDown) {
@@ -299,7 +298,7 @@ void CPWL_ListBox::SetHoverSel(FX_BOOL bHoverSel) {
m_bHoverSel = bHoverSel;
}
-FX_BOOL CPWL_ListBox::OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnMouseMove(point, nFlag);
if (m_bHoverSel && !IsCaptureMouse() && ClientHitTest(point)) {
@@ -347,7 +346,7 @@ void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd,
switch (wParam) {
case SBT_VSCROLL:
if (m_pList)
- m_pList->SetScrollPos(CFX_FloatPoint(0, fPos));
+ m_pList->SetScrollPos(CPDF_Point(0, fPos));
break;
}
break;
@@ -381,9 +380,9 @@ void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown,
nFlag);
}
-CFX_FloatRect CPWL_ListBox::GetFocusRect() const {
+CPDF_Rect CPWL_ListBox::GetFocusRect() const {
if (m_pList && m_pList->IsMultipleSel()) {
- CFX_FloatRect rcCaret = m_pList->GetItemRect(m_pList->GetCaret());
+ CPDF_Rect rcCaret = m_pList->GetItemRect(m_pList->GetCaret());
rcCaret.Intersect(GetClientRect());
return rcCaret;
}
@@ -496,11 +495,11 @@ int32_t CPWL_ListBox::FindNext(int32_t nIndex, FX_WCHAR nChar) const {
return nIndex;
}
-CFX_FloatRect CPWL_ListBox::GetContentRect() const {
+CPDF_Rect CPWL_ListBox::GetContentRect() const {
if (m_pList)
return m_pList->GetContentRect();
- return CFX_FloatRect();
+ return CPDF_Rect();
}
FX_FLOAT CPWL_ListBox::GetFirstHeight() const {
@@ -510,13 +509,13 @@ FX_FLOAT CPWL_ListBox::GetFirstHeight() const {
return 0.0f;
}
-CFX_FloatRect CPWL_ListBox::GetListRect() const {
+CPDF_Rect CPWL_ListBox::GetListRect() const {
return CPWL_Utils::DeflateRect(
GetWindowRect(), (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
}
FX_BOOL CPWL_ListBox::OnMouseWheel(short zDelta,
- const CFX_FloatPoint& point,
+ const CPDF_Point& point,
FX_DWORD nFlag) {
if (!m_pList)
return FALSE;
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
index 1c32ceb251..6d9627b08a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
@@ -16,7 +16,7 @@ CPWL_ListCtrl::CPWL_ListCtrl()
CPWL_ListCtrl::~CPWL_ListCtrl() {}
-void CPWL_ListCtrl::SetScrollPos(const CFX_FloatPoint& point) {
+void CPWL_ListCtrl::SetScrollPos(const CPDF_Point& point) {
m_ptScroll = point;
if (m_ptScroll.x < m_rcContent.left)
@@ -32,11 +32,11 @@ void CPWL_ListCtrl::SetScrollPos(const CFX_FloatPoint& point) {
m_ptScroll.y = m_rcContent.bottom;
}
-CFX_FloatPoint CPWL_ListCtrl::GetScrollPos() const {
+CPDF_Point CPWL_ListCtrl::GetScrollPos() const {
return m_ptScroll;
}
-CFX_FloatRect CPWL_ListCtrl::GetScrollArea() const {
+CPDF_Rect CPWL_ListCtrl::GetScrollArea() const {
return m_rcContent;
}
@@ -77,7 +77,7 @@ FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth) {
}
void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, int32_t nStart) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
FX_FLOAT fWidth = rcClient.Width();
@@ -98,9 +98,8 @@ void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, int32_t nStart) {
if (bMove) {
FX_FLOAT fItemHeight = pChild->GetItemHeight(fWidth - fLeft - fRight);
- pChild->Move(
- CFX_FloatRect(fLeft, fy - fItemHeight, fWidth - fRight, fy), TRUE,
- FALSE);
+ pChild->Move(CPDF_Rect(fLeft, fy - fItemHeight, fWidth - fRight, fy),
+ TRUE, FALSE);
fy -= fItemHeight;
fy -= m_fItemSpace;
}
@@ -138,8 +137,8 @@ void CPWL_ListCtrl::RePosChildWnd() {
void CPWL_ListCtrl::DrawChildAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
pDevice->SaveState();
- CFX_FloatRect rcClient = GetClientRect();
- CFX_FloatRect rcTemp = rcClient;
+ CPDF_Rect rcClient = GetClientRect();
+ CPDF_Rect rcTemp = rcClient;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcClip((int32_t)rcTemp.left, (int32_t)rcTemp.bottom,
(int32_t)rcTemp.right, (int32_t)rcTemp.top);
@@ -148,7 +147,7 @@ void CPWL_ListCtrl::DrawChildAppearance(CFX_RenderDevice* pDevice,
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) {
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i)) {
- CFX_FloatRect rcChild = pChild->ChildToParent(pChild->GetWindowRect());
+ CPDF_Rect rcChild = pChild->ChildToParent(pChild->GetWindowRect());
if (!(rcChild.top < rcClient.bottom || rcChild.bottom > rcClient.top)) {
CFX_Matrix mt = pChild->GetChildMatrix();
if (mt.IsIdentity()) {
@@ -173,34 +172,34 @@ int32_t CPWL_ListCtrl::GetItemIndex(CPWL_Wnd* pItem) {
return -1;
}
-CFX_FloatPoint CPWL_ListCtrl::InToOut(const CFX_FloatPoint& point) const {
- CFX_FloatRect rcClient = GetClientRect();
+CPDF_Point CPWL_ListCtrl::InToOut(const CPDF_Point& point) const {
+ CPDF_Rect rcClient = GetClientRect();
- return CFX_FloatPoint(point.x + rcClient.left - m_ptScroll.x,
- point.y + rcClient.top - m_ptScroll.y);
+ return CPDF_Point(point.x + rcClient.left - m_ptScroll.x,
+ point.y + rcClient.top - m_ptScroll.y);
}
-CFX_FloatPoint CPWL_ListCtrl::OutToIn(const CFX_FloatPoint& point) const {
- CFX_FloatRect rcClient = GetClientRect();
+CPDF_Point CPWL_ListCtrl::OutToIn(const CPDF_Point& point) const {
+ CPDF_Rect rcClient = GetClientRect();
- return CFX_FloatPoint(point.x - rcClient.left + m_ptScroll.x,
- point.y - rcClient.top + m_ptScroll.y);
+ return CPDF_Point(point.x - rcClient.left + m_ptScroll.x,
+ point.y - rcClient.top + m_ptScroll.y);
}
-CFX_FloatRect CPWL_ListCtrl::InToOut(const CFX_FloatRect& rect) const {
- CFX_FloatRect rcClient = GetClientRect();
+CPDF_Rect CPWL_ListCtrl::InToOut(const CPDF_Rect& rect) const {
+ CPDF_Rect rcClient = GetClientRect();
- return CFX_FloatRect(rect.left + rcClient.left - m_ptScroll.x,
- rect.bottom + rcClient.top - m_ptScroll.y,
- rect.right + rcClient.left - m_ptScroll.x,
- rect.top + rcClient.top - m_ptScroll.y);
+ return CPDF_Rect(rect.left + rcClient.left - m_ptScroll.x,
+ rect.bottom + rcClient.top - m_ptScroll.y,
+ rect.right + rcClient.left - m_ptScroll.x,
+ rect.top + rcClient.top - m_ptScroll.y);
}
-CFX_FloatRect CPWL_ListCtrl::OutToIn(const CFX_FloatRect& rect) const {
- CFX_FloatRect rcClient = GetClientRect();
+CPDF_Rect CPWL_ListCtrl::OutToIn(const CPDF_Rect& rect) const {
+ CPDF_Rect rcClient = GetClientRect();
- return CFX_FloatRect(rect.left - rcClient.left + m_ptScroll.x,
- rect.bottom - rcClient.top + m_ptScroll.y,
- rect.right - rcClient.left + m_ptScroll.x,
- rect.top - rcClient.top + m_ptScroll.y);
+ return CPDF_Rect(rect.left - rcClient.left + m_ptScroll.x,
+ rect.bottom - rcClient.top + m_ptScroll.y,
+ rect.right - rcClient.left + m_ptScroll.x,
+ rect.top - rcClient.top + m_ptScroll.y);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 1933d564f4..760967b6a2 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -42,14 +42,14 @@ void CPWL_Note_Options::SetTextColor(const CPWL_Color& color) {
void CPWL_Note_Options::RePosChildWnd() {
if (IsValid()) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
if (rcClient.Width() > 15.0f) {
rcClient.right -= 15.0f;
m_pText->Move(rcClient, TRUE, FALSE);
m_pText->SetVisible(TRUE);
} else {
- m_pText->Move(CFX_FloatRect(0, 0, 0, 0), TRUE, FALSE);
+ m_pText->Move(CPDF_Rect(0, 0, 0, 0), TRUE, FALSE);
m_pText->SetVisible(FALSE);
}
}
@@ -71,16 +71,15 @@ void CPWL_Note_Options::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
rcClient.left = rcClient.right - 15.0f;
- CFX_FloatPoint ptCenter =
- CFX_FloatPoint((rcClient.left + rcClient.right) * 0.5f,
- (rcClient.top + rcClient.bottom) * 0.5f);
+ CPDF_Point ptCenter = CPDF_Point((rcClient.left + rcClient.right) * 0.5f,
+ (rcClient.top + rcClient.bottom) * 0.5f);
- CFX_FloatPoint pt1(ptCenter.x - 2.0f, ptCenter.y + 2.0f * 0.5f);
- CFX_FloatPoint pt2(ptCenter.x + 2.0f, ptCenter.y + 2.0f * 0.5f);
- CFX_FloatPoint pt3(ptCenter.x, ptCenter.y - 3.0f * 0.5f);
+ CPDF_Point pt1(ptCenter.x - 2.0f, ptCenter.y + 2.0f * 0.5f);
+ CPDF_Point pt2(ptCenter.x + 2.0f, ptCenter.y + 2.0f * 0.5f);
+ CPDF_Point pt3(ptCenter.x, ptCenter.y - 3.0f * 0.5f);
CFX_PathData path;
@@ -96,8 +95,8 @@ void CPWL_Note_Options::DrawThisAppearance(CFX_RenderDevice* pDevice,
FXFILL_ALTERNATE);
}
-CFX_FloatRect CPWL_Note_Options::GetContentRect() const {
- CFX_FloatRect rcText = m_pText->GetContentRect();
+CPDF_Rect CPWL_Note_Options::GetContentRect() const {
+ CPDF_Rect rcText = m_pText->GetContentRect();
rcText.right += 15.0f;
return rcText;
}
@@ -206,7 +205,7 @@ FX_FLOAT CPWL_Note_Edit::GetItemHeight(FX_FLOAT fLimitWidth) {
EnableRefresh(FALSE);
m_pEdit->EnableNotify(FALSE);
- Move(CFX_FloatRect(0, 0, fLimitWidth, 0), TRUE, FALSE);
+ Move(CPDF_Rect(0, 0, fLimitWidth, 0), TRUE, FALSE);
FX_FLOAT fRet = GetContentRect().Height();
m_pEdit->EnableNotify(TRUE);
@@ -233,7 +232,7 @@ CPWL_Note_LBBox::~CPWL_Note_LBBox() {}
void CPWL_Note_LBBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
CFX_GraphStateData gsd;
gsd.m_LineWidth = 1.0f;
@@ -260,7 +259,7 @@ CPWL_Note_RBBox::~CPWL_Note_RBBox() {}
void CPWL_Note_RBBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
CFX_GraphStateData gsd;
gsd.m_LineWidth = 1.0f;
@@ -304,7 +303,7 @@ void CPWL_Note_CloseBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
CPWL_Button::DrawThisAppearance(pDevice, pUser2Device);
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
rcClient = CPWL_Utils::DeflateRect(rcClient, 2.0f);
CFX_GraphStateData gsd;
@@ -331,7 +330,7 @@ void CPWL_Note_CloseBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
FXFILL_ALTERNATE);
}
-FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CFX_FloatPoint& point,
+FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CPDF_Point& point,
FX_DWORD nFlag) {
SetBorderStyle(PBS_INSET);
InvalidateRect(NULL);
@@ -341,7 +340,7 @@ FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CFX_FloatPoint& point,
return CPWL_Button::OnLButtonDown(point, nFlag);
}
-FX_BOOL CPWL_Note_CloseBox::OnLButtonUp(const CFX_FloatPoint& point,
+FX_BOOL CPWL_Note_CloseBox::OnLButtonUp(const CPDF_Point& point,
FX_DWORD nFlag) {
m_bMouseDown = FALSE;
@@ -449,8 +448,8 @@ void CPWL_Note_Contents::DeleteSubItem(IPWL_NoteItem* pNoteItem) {
}
}
-IPWL_NoteItem* CPWL_Note_Contents::GetHitNoteItem(const CFX_FloatPoint& point) {
- CFX_FloatPoint pt = ParentToChild(point);
+IPWL_NoteItem* CPWL_Note_Contents::GetHitNoteItem(const CPDF_Point& point) {
+ CPDF_Point pt = ParentToChild(point);
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) {
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i)) {
@@ -489,7 +488,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd,
}
return;
case PNM_SCROLLWINDOW:
- SetScrollPos(CFX_FloatPoint(0.0f, *(FX_FLOAT*)lParam));
+ SetScrollPos(CPDF_Point(0.0f, *(FX_FLOAT*)lParam));
ResetFace();
InvalidateRect(NULL);
return;
@@ -525,7 +524,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd,
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
}
-FX_BOOL CPWL_Note_Contents::OnLButtonDown(const CFX_FloatPoint& point,
+FX_BOOL CPWL_Note_Contents::OnLButtonDown(const CPDF_Point& point,
FX_DWORD nFlag) {
if (CPWL_Wnd::OnLButtonDown(point, nFlag))
return TRUE;
@@ -632,9 +631,9 @@ void CPWL_NoteItem::CreateChildWnd(const PWL_CREATEPARAM& cp) {
void CPWL_NoteItem::RePosChildWnd() {
if (IsValid()) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
- CFX_FloatRect rcSubject = rcClient;
+ CPDF_Rect rcSubject = rcClient;
rcSubject.left += POPUP_ITEM_TEXT_INDENT;
rcSubject.top = rcClient.top;
rcSubject.right =
@@ -645,7 +644,7 @@ void CPWL_NoteItem::RePosChildWnd() {
m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
- CFX_FloatRect rcDate = rcClient;
+ CPDF_Rect rcDate = rcClient;
rcDate.right -= POPUP_ITEM_TEXT_INDENT;
rcDate.left =
PWL_MAX(rcDate.right - m_pDateTime->GetContentRect().Width() - 1.0f,
@@ -655,7 +654,7 @@ void CPWL_NoteItem::RePosChildWnd() {
m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
- CFX_FloatRect rcContents = rcClient;
+ CPDF_Rect rcContents = rcClient;
rcContents.left += 1.0f;
rcContents.right -= 1.0f;
rcContents.top = rcDate.bottom - POPUP_ITEM_HEAD_BOTTOM;
@@ -851,8 +850,8 @@ void CPWL_NoteItem::DeleteSubItem(IPWL_NoteItem* pNoteItem) {
m_pContents->DeleteSubItem(pNoteItem);
}
-IPWL_NoteItem* CPWL_NoteItem::GetHitNoteItem(const CFX_FloatPoint& point) {
- CFX_FloatPoint pt = ParentToChild(point);
+IPWL_NoteItem* CPWL_NoteItem::GetHitNoteItem(const CPDF_Point& point) {
+ CPDF_Point pt = ParentToChild(point);
if (WndHitTest(pt)) {
if (m_pContents) {
@@ -910,8 +909,7 @@ FX_FLOAT CPWL_NoteItem::GetItemRightMargin() {
return POPUP_ITEM_SIDEMARGIN;
}
-FX_BOOL CPWL_NoteItem::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_NoteItem::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point))) {
SetNoteFocus(FALSE);
}
@@ -921,8 +919,7 @@ FX_BOOL CPWL_NoteItem::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_NoteItem::OnRButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_NoteItem::OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point))) {
SetNoteFocus(FALSE);
PopupNoteItemMenu(point);
@@ -967,7 +964,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd,
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
}
-void CPWL_NoteItem::PopupNoteItemMenu(const CFX_FloatPoint& point) {
+void CPWL_NoteItem::PopupNoteItemMenu(const CPDF_Point& point) {
if (IPWL_NoteNotify* pNotify = GetNoteNotify()) {
int32_t x, y;
PWLtoWnd(point, x, y);
@@ -1080,13 +1077,13 @@ FX_BOOL CPWL_Note::ResetScrollBar() {
}
if (bScrollChanged) {
- CFX_FloatRect rcNote = GetClientRect();
- CFX_FloatRect rcContents = m_pContents->GetWindowRect();
+ CPDF_Rect rcNote = GetClientRect();
+ CPDF_Rect rcContents = m_pContents->GetWindowRect();
rcContents.right = rcNote.right - 3.0f;
if (m_pContentsBar->IsVisible())
rcContents.right -= PWL_SCROLLBAR_WIDTH;
m_pContents->Move(rcContents, TRUE, TRUE);
- m_pContents->SetScrollPos(CFX_FloatPoint(0.0f, 0.0f));
+ m_pContents->SetScrollPos(CPDF_Point(0.0f, 0.0f));
m_pContents->InvalidateRect(NULL);
}
@@ -1094,8 +1091,8 @@ FX_BOOL CPWL_Note::ResetScrollBar() {
}
FX_BOOL CPWL_Note::ScrollBarShouldVisible() {
- CFX_FloatRect rcContentsFact = m_pContents->GetScrollArea();
- CFX_FloatRect rcContentsClient = m_pContents->GetClientRect();
+ CPDF_Rect rcContentsFact = m_pContents->GetScrollArea();
+ CPDF_Rect rcContentsClient = m_pContents->GetClientRect();
return rcContentsFact.Height() > rcContentsClient.Height();
}
@@ -1114,9 +1111,9 @@ void CPWL_Note::RePosNoteChildren() {
m_bResizing = TRUE;
if (IsValid()) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
- CFX_FloatRect rcIcon = rcClient;
+ CPDF_Rect rcIcon = rcClient;
rcIcon.top -= 2.0f;
rcIcon.right = rcIcon.left + 14.0f;
rcIcon.bottom = rcIcon.top - 14.0f;
@@ -1124,7 +1121,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pIcon->Move(rcIcon, TRUE, FALSE);
m_pIcon->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcIcon));
- CFX_FloatRect rcCloseBox = rcClient;
+ CPDF_Rect rcCloseBox = rcClient;
rcCloseBox.right -= 1.0f;
rcCloseBox.top -= 1.0f;
rcCloseBox.left = rcCloseBox.right - 14.0f;
@@ -1133,7 +1130,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pCloseBox->Move(rcCloseBox, TRUE, FALSE);
m_pCloseBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcCloseBox));
- CFX_FloatRect rcDate = rcClient;
+ CPDF_Rect rcDate = rcClient;
rcDate.right = rcCloseBox.left - POPUP_ITEM_TEXT_INDENT;
rcDate.left =
PWL_MAX(rcDate.right - m_pDateTime->GetContentRect().Width() - 1.0f,
@@ -1144,7 +1141,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
- CFX_FloatRect rcSubject = rcClient;
+ CPDF_Rect rcSubject = rcClient;
rcSubject.top = rcClient.top - 2.0f;
rcSubject.left = rcIcon.right + POPUP_ITEM_TEXT_INDENT;
rcSubject.right =
@@ -1155,7 +1152,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
- CFX_FloatRect rcOptions = rcClient;
+ CPDF_Rect rcOptions = rcClient;
rcOptions.left =
PWL_MAX(rcOptions.right - m_pOptions->GetContentRect().Width(),
rcIcon.right + 1.0f);
@@ -1165,7 +1162,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pOptions->Move(rcOptions, TRUE, FALSE);
m_pOptions->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcOptions));
- CFX_FloatRect rcAuthor = rcClient;
+ CPDF_Rect rcAuthor = rcClient;
rcAuthor.top = rcSubject.bottom - 4.0f;
rcAuthor.left = rcSubject.left;
rcAuthor.right =
@@ -1176,21 +1173,21 @@ void CPWL_Note::RePosNoteChildren() {
m_pAuthor->Move(rcAuthor, TRUE, FALSE);
m_pAuthor->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcAuthor));
- CFX_FloatRect rcLBBox = rcClient;
+ CPDF_Rect rcLBBox = rcClient;
rcLBBox.top = rcLBBox.bottom + 7.0f;
rcLBBox.right = rcLBBox.left + 7.0f;
rcLBBox.Normalize();
m_pLBBox->Move(rcLBBox, TRUE, FALSE);
m_pLBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcLBBox));
- CFX_FloatRect rcRBBox = rcClient;
+ CPDF_Rect rcRBBox = rcClient;
rcRBBox.top = rcRBBox.bottom + 7.0f;
rcRBBox.left = rcRBBox.right - 7.0f;
rcRBBox.Normalize();
m_pRBBox->Move(rcRBBox, TRUE, FALSE);
m_pRBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcRBBox));
- CFX_FloatRect rcContents = rcClient;
+ CPDF_Rect rcContents = rcClient;
rcContents.top = rcAuthor.bottom - POPUP_ITEM_HEAD_BOTTOM;
rcContents.left += 3.0f;
rcContents.right -= 3.0f;
@@ -1201,7 +1198,7 @@ void CPWL_Note::RePosNoteChildren() {
m_pContents->Move(rcContents, FALSE, FALSE);
m_pContents->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcContents));
- CFX_FloatRect rcContentsBar = rcContents;
+ CPDF_Rect rcContentsBar = rcContents;
rcContentsBar.right = rcClient.right - 3.0f;
rcContentsBar.left = rcContentsBar.right - PWL_SCROLLBAR_WIDTH;
rcContentsBar.Normalize();
@@ -1300,14 +1297,14 @@ CFX_WideString CPWL_Note::GetAuthorName() const {
}
FX_BOOL CPWL_Note::OnMouseWheel(short zDelta,
- const CFX_FloatPoint& point,
+ const CPDF_Point& point,
FX_DWORD nFlag) {
- CFX_FloatPoint ptScroll = m_pContents->GetScrollPos();
- CFX_FloatRect rcScroll = m_pContents->GetScrollArea();
- CFX_FloatRect rcContents = m_pContents->GetClientRect();
+ CPDF_Point ptScroll = m_pContents->GetScrollPos();
+ CPDF_Rect rcScroll = m_pContents->GetScrollArea();
+ CPDF_Rect rcContents = m_pContents->GetClientRect();
if (rcScroll.top - rcScroll.bottom > rcContents.Height()) {
- CFX_FloatPoint ptNew = ptScroll;
+ CPDF_Point ptNew = ptScroll;
if (zDelta > 0)
ptNew.y += 30;
@@ -1341,7 +1338,7 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd,
intptr_t lParam) {
switch (msg) {
case PNM_NOTEEDITCHANGED: {
- CFX_FloatRect rcScroll = m_pContents->GetScrollArea();
+ CPDF_Rect rcScroll = m_pContents->GetScrollArea();
PWL_SCROLL_INFO sInfo;
sInfo.fContentMin = rcScroll.bottom;
@@ -1369,8 +1366,8 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd,
(intptr_t)&sInfo);
m_OldScrollInfo = sInfo;
- CFX_FloatPoint ptScroll = m_pContents->GetScrollPos();
- CFX_FloatPoint ptOld = ptScroll;
+ CPDF_Point ptScroll = m_pContents->GetScrollPos();
+ CPDF_Point ptOld = ptScroll;
if (ptScroll.y > sInfo.fContentMax)
ptScroll.y = sInfo.fContentMax;
@@ -1407,13 +1404,13 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd,
if (msg == PNM_SETCARETINFO && IsValid()) {
if (PWL_CARET_INFO* pInfo = (PWL_CARET_INFO*)wParam) {
if (m_pContents) {
- CFX_FloatRect rcClient = m_pContents->GetClientRect();
+ CPDF_Rect rcClient = m_pContents->GetClientRect();
if (pInfo->ptHead.y > rcClient.top) {
- CFX_FloatPoint pt = m_pContents->OutToIn(pInfo->ptHead);
+ CPDF_Point pt = m_pContents->OutToIn(pInfo->ptHead);
m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL,
(intptr_t)&pt.y);
- CFX_FloatPoint ptScroll = m_pContents->GetScrollPos();
+ CPDF_Point ptScroll = m_pContents->GetScrollPos();
m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL,
(intptr_t)&ptScroll.y);
@@ -1421,12 +1418,12 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd,
}
if (pInfo->ptFoot.y < rcClient.bottom) {
- CFX_FloatPoint pt = m_pContents->OutToIn(pInfo->ptFoot);
+ CPDF_Point pt = m_pContents->OutToIn(pInfo->ptFoot);
pt.y += rcClient.Height();
m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL,
(intptr_t)&pt.y);
- CFX_FloatPoint ptScroll = m_pContents->GetScrollPos();
+ CPDF_Point ptScroll = m_pContents->GetScrollPos();
m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL,
(intptr_t)&ptScroll.y);
@@ -1461,7 +1458,7 @@ void CPWL_Note::SetBkColor(const CPWL_Color& color) {
m_pRBBox->SetTextColor(sTextColor);
}
-FX_BOOL CPWL_Note::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
if (m_pOptions->WndHitTest(m_pOptions->ParentToChild(point))) {
if (IPWL_NoteNotify* pNotify = GetNoteNotify()) {
int32_t x, y;
@@ -1478,7 +1475,7 @@ FX_BOOL CPWL_Note::OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) {
return CPWL_Wnd::OnLButtonDown(point, nFlag);
}
-FX_BOOL CPWL_Note::OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) {
+FX_BOOL CPWL_Note::OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
return CPWL_Wnd::OnRButtonUp(point, nFlag);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
index 03bf3238fa..c48052da9a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
@@ -132,25 +132,24 @@ void CPWL_SBButton::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CFX_ByteTextBuf sButton;
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (rectWnd.IsEmpty())
return;
sAppStream << "q\n";
- CFX_FloatPoint ptCenter = GetCenterPoint();
+ CPDF_Point ptCenter = GetCenterPoint();
switch (m_eScrollBarType) {
case SBT_HSCROLL:
switch (m_eSBButtonType) {
case PSBT_MIN: {
- CFX_FloatPoint pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y);
- CFX_FloatPoint pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y + PWL_TRIANGLE_HALFLEN);
- CFX_FloatPoint pt3(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y - PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f, ptCenter.y);
+ CPDF_Point pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt3(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -164,12 +163,11 @@ void CPWL_SBButton::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
}
} break;
case PSBT_MAX: {
- CFX_FloatPoint pt1(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y);
- CFX_FloatPoint pt2(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y + PWL_TRIANGLE_HALFLEN);
- CFX_FloatPoint pt3(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y - PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt1(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f, ptCenter.y);
+ CPDF_Point pt2(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt3(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -189,12 +187,11 @@ void CPWL_SBButton::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
case SBT_VSCROLL:
switch (m_eSBButtonType) {
case PSBT_MIN: {
- CFX_FloatPoint pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN,
- ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN,
- ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt3(ptCenter.x,
- ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt3(ptCenter.x, ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -208,12 +205,11 @@ void CPWL_SBButton::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
}
} break;
case PSBT_MAX: {
- CFX_FloatPoint pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN,
- ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
- CFX_FloatPoint pt3(ptCenter.x,
- ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN * 0.5f);
+ CPDF_Point pt3(ptCenter.x, ptCenter.y - PWL_TRIANGLE_HALFLEN * 0.5f);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -242,11 +238,11 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (!IsVisible())
return;
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (rectWnd.IsEmpty())
return;
- CFX_FloatPoint ptCenter = GetCenterPoint();
+ CPDF_Point ptCenter = GetCenterPoint();
int32_t nTransparancy = GetTransparency();
switch (m_eScrollBarType) {
@@ -254,12 +250,11 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
switch (m_eSBButtonType) {
case PSBT_MIN: {
- CFX_FloatPoint pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y);
- CFX_FloatPoint pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y + PWL_TRIANGLE_HALFLEN);
- CFX_FloatPoint pt3(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y - PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt1(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f, ptCenter.y);
+ CPDF_Point pt2(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt3(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -278,12 +273,11 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
} break;
case PSBT_MAX: {
- CFX_FloatPoint pt1(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y);
- CFX_FloatPoint pt2(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y + PWL_TRIANGLE_HALFLEN);
- CFX_FloatPoint pt3(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
- ptCenter.y - PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt1(ptCenter.x + PWL_TRIANGLE_HALFLEN * 0.5f, ptCenter.y);
+ CPDF_Point pt2(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y + PWL_TRIANGLE_HALFLEN);
+ CPDF_Point pt3(ptCenter.x - PWL_TRIANGLE_HALFLEN * 0.5f,
+ ptCenter.y - PWL_TRIANGLE_HALFLEN);
if (rectWnd.right - rectWnd.left > PWL_TRIANGLE_HALFLEN * 2 &&
rectWnd.top - rectWnd.bottom > PWL_TRIANGLE_HALFLEN) {
@@ -309,7 +303,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
switch (m_eSBButtonType) {
case PSBT_MIN: {
// draw border
- CFX_FloatRect rcDraw = rectWnd;
+ CPDF_Rect rcDraw = rectWnd;
CPWL_Utils::DrawStrokeRect(pDevice, pUser2Device, rcDraw,
ArgbEncode(nTransparancy, 100, 100, 100),
0.0f);
@@ -336,13 +330,13 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (rectWnd.top - rectWnd.bottom > 6.0f) {
FX_FLOAT fX = rectWnd.left + 1.5f;
FX_FLOAT fY = rectWnd.bottom;
- CFX_FloatPoint pts[7] = {CFX_FloatPoint(fX + 2.5f, fY + 4.0f),
- CFX_FloatPoint(fX + 2.5f, fY + 3.0f),
- CFX_FloatPoint(fX + 4.5f, fY + 5.0f),
- CFX_FloatPoint(fX + 6.5f, fY + 3.0f),
- CFX_FloatPoint(fX + 6.5f, fY + 4.0f),
- CFX_FloatPoint(fX + 4.5f, fY + 6.0f),
- CFX_FloatPoint(fX + 2.5f, fY + 4.0f)};
+ CPDF_Point pts[7] = {CPDF_Point(fX + 2.5f, fY + 4.0f),
+ CPDF_Point(fX + 2.5f, fY + 3.0f),
+ CPDF_Point(fX + 4.5f, fY + 5.0f),
+ CPDF_Point(fX + 6.5f, fY + 3.0f),
+ CPDF_Point(fX + 6.5f, fY + 4.0f),
+ CPDF_Point(fX + 4.5f, fY + 6.0f),
+ CPDF_Point(fX + 2.5f, fY + 4.0f)};
if (IsEnabled())
CPWL_Utils::DrawFillArea(
@@ -356,7 +350,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
} break;
case PSBT_MAX: {
// draw border
- CFX_FloatRect rcDraw = rectWnd;
+ CPDF_Rect rcDraw = rectWnd;
CPWL_Utils::DrawStrokeRect(pDevice, pUser2Device, rcDraw,
ArgbEncode(nTransparancy, 100, 100, 100),
0.0f);
@@ -382,13 +376,13 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
FX_FLOAT fX = rectWnd.left + 1.5f;
FX_FLOAT fY = rectWnd.bottom;
- CFX_FloatPoint pts[7] = {CFX_FloatPoint(fX + 2.5f, fY + 5.0f),
- CFX_FloatPoint(fX + 2.5f, fY + 6.0f),
- CFX_FloatPoint(fX + 4.5f, fY + 4.0f),
- CFX_FloatPoint(fX + 6.5f, fY + 6.0f),
- CFX_FloatPoint(fX + 6.5f, fY + 5.0f),
- CFX_FloatPoint(fX + 4.5f, fY + 3.0f),
- CFX_FloatPoint(fX + 2.5f, fY + 5.0f)};
+ CPDF_Point pts[7] = {CPDF_Point(fX + 2.5f, fY + 5.0f),
+ CPDF_Point(fX + 2.5f, fY + 6.0f),
+ CPDF_Point(fX + 4.5f, fY + 4.0f),
+ CPDF_Point(fX + 6.5f, fY + 6.0f),
+ CPDF_Point(fX + 6.5f, fY + 5.0f),
+ CPDF_Point(fX + 4.5f, fY + 3.0f),
+ CPDF_Point(fX + 2.5f, fY + 5.0f)};
if (IsEnabled())
CPWL_Utils::DrawFillArea(
@@ -402,7 +396,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
} break;
case PSBT_POS: {
// draw border
- CFX_FloatRect rcDraw = rectWnd;
+ CPDF_Rect rcDraw = rectWnd;
CPWL_Utils::DrawStrokeRect(pDevice, pUser2Device, rcDraw,
ArgbEncode(nTransparancy, 100, 100, 100),
0.0f);
@@ -416,10 +410,9 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (IsEnabled()) {
// draw shadow effect
- CFX_FloatPoint ptTop =
- CFX_FloatPoint(rectWnd.left, rectWnd.top - 1.0f);
- CFX_FloatPoint ptBottom =
- CFX_FloatPoint(rectWnd.left, rectWnd.bottom + 1.0f);
+ CPDF_Point ptTop = CPDF_Point(rectWnd.left, rectWnd.top - 1.0f);
+ CPDF_Point ptBottom =
+ CPDF_Point(rectWnd.left, rectWnd.bottom + 1.0f);
ptTop.x += 1.5f;
ptBottom.x += 1.5f;
@@ -506,12 +499,12 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
FX_FLOAT nFrictionWidth = 5.0f;
FX_FLOAT nFrictionHeight = 5.5f;
- CFX_FloatPoint ptLeft =
- CFX_FloatPoint(ptCenter.x - nFrictionWidth / 2.0f,
- ptCenter.y - nFrictionHeight / 2.0f + 0.5f);
- CFX_FloatPoint ptRight =
- CFX_FloatPoint(ptCenter.x + nFrictionWidth / 2.0f,
- ptCenter.y - nFrictionHeight / 2.0f + 0.5f);
+ CPDF_Point ptLeft =
+ CPDF_Point(ptCenter.x - nFrictionWidth / 2.0f,
+ ptCenter.y - nFrictionHeight / 2.0f + 0.5f);
+ CPDF_Point ptRight =
+ CPDF_Point(ptCenter.x + nFrictionWidth / 2.0f,
+ ptCenter.y - nFrictionHeight / 2.0f + 0.5f);
CPWL_Utils::DrawStrokeLine(pDevice, pUser2Device, ptLeft, ptRight,
crStroke, 1.0f);
@@ -538,8 +531,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
-FX_BOOL CPWL_SBButton::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_SBButton::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (CPWL_Wnd* pParent = GetParentWindow())
@@ -551,8 +543,7 @@ FX_BOOL CPWL_SBButton::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_SBButton::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_SBButton::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (CPWL_Wnd* pParent = GetParentWindow())
@@ -564,8 +555,7 @@ FX_BOOL CPWL_SBButton::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_SBButton::OnMouseMove(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_SBButton::OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnMouseMove(point, nFlag);
if (CPWL_Wnd* pParent = GetParentWindow()) {
@@ -595,8 +585,8 @@ void CPWL_ScrollBar::OnCreate(PWL_CREATEPARAM& cp) {
}
void CPWL_ScrollBar::RePosChildWnd() {
- CFX_FloatRect rcClient = GetClientRect();
- CFX_FloatRect rcMinButton, rcMaxButton;
+ CPDF_Rect rcClient = GetClientRect();
+ CPDF_Rect rcMinButton, rcMaxButton;
FX_FLOAT fBWidth = 0;
switch (m_sbType) {
@@ -604,22 +594,21 @@ void CPWL_ScrollBar::RePosChildWnd() {
if (rcClient.right - rcClient.left >
PWL_SCROLLBAR_BUTTON_WIDTH * 2 + PWL_SCROLLBAR_POSBUTTON_MINWIDTH +
2) {
- rcMinButton = CFX_FloatRect(rcClient.left, rcClient.bottom,
- rcClient.left + PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.top);
- rcMaxButton =
- CFX_FloatRect(rcClient.right - PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.bottom, rcClient.right, rcClient.top);
+ rcMinButton =
+ CPDF_Rect(rcClient.left, rcClient.bottom,
+ rcClient.left + PWL_SCROLLBAR_BUTTON_WIDTH, rcClient.top);
+ rcMaxButton = CPDF_Rect(rcClient.right - PWL_SCROLLBAR_BUTTON_WIDTH,
+ rcClient.bottom, rcClient.right, rcClient.top);
} else {
fBWidth = (rcClient.right - rcClient.left -
PWL_SCROLLBAR_POSBUTTON_MINWIDTH - 2) /
2;
if (fBWidth > 0) {
- rcMinButton = CFX_FloatRect(rcClient.left, rcClient.bottom,
- rcClient.left + fBWidth, rcClient.top);
- rcMaxButton = CFX_FloatRect(rcClient.right - fBWidth, rcClient.bottom,
- rcClient.right, rcClient.top);
+ rcMinButton = CPDF_Rect(rcClient.left, rcClient.bottom,
+ rcClient.left + fBWidth, rcClient.top);
+ rcMaxButton = CPDF_Rect(rcClient.right - fBWidth, rcClient.bottom,
+ rcClient.right, rcClient.top);
} else {
SetVisible(FALSE);
}
@@ -629,23 +618,21 @@ void CPWL_ScrollBar::RePosChildWnd() {
if (IsFloatBigger(rcClient.top - rcClient.bottom,
PWL_SCROLLBAR_BUTTON_WIDTH * 2 +
PWL_SCROLLBAR_POSBUTTON_MINWIDTH + 2)) {
- rcMinButton = CFX_FloatRect(rcClient.left,
- rcClient.top - PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.right, rcClient.top);
- rcMaxButton =
- CFX_FloatRect(rcClient.left, rcClient.bottom, rcClient.right,
- rcClient.bottom + PWL_SCROLLBAR_BUTTON_WIDTH);
+ rcMinButton =
+ CPDF_Rect(rcClient.left, rcClient.top - PWL_SCROLLBAR_BUTTON_WIDTH,
+ rcClient.right, rcClient.top);
+ rcMaxButton = CPDF_Rect(rcClient.left, rcClient.bottom, rcClient.right,
+ rcClient.bottom + PWL_SCROLLBAR_BUTTON_WIDTH);
} else {
fBWidth = (rcClient.top - rcClient.bottom -
PWL_SCROLLBAR_POSBUTTON_MINWIDTH - 2) /
2;
if (IsFloatBigger(fBWidth, 0)) {
- rcMinButton = CFX_FloatRect(rcClient.left, rcClient.top - fBWidth,
- rcClient.right, rcClient.top);
- rcMaxButton =
- CFX_FloatRect(rcClient.left, rcClient.bottom, rcClient.right,
- rcClient.bottom + fBWidth);
+ rcMinButton = CPDF_Rect(rcClient.left, rcClient.top - fBWidth,
+ rcClient.right, rcClient.top);
+ rcMaxButton = CPDF_Rect(rcClient.left, rcClient.bottom,
+ rcClient.right, rcClient.bottom + fBWidth);
} else {
SetVisible(FALSE);
}
@@ -661,7 +648,7 @@ void CPWL_ScrollBar::RePosChildWnd() {
}
void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (IsVisible() && !rectWnd.IsEmpty()) {
CFX_ByteTextBuf sButton;
@@ -679,7 +666,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (IsVisible() && !rectWnd.IsEmpty()) {
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rectWnd,
@@ -687,20 +674,19 @@ void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Utils::DrawStrokeLine(
pDevice, pUser2Device,
- CFX_FloatPoint(rectWnd.left + 2.0f, rectWnd.top - 2.0f),
- CFX_FloatPoint(rectWnd.left + 2.0f, rectWnd.bottom + 2.0f),
+ CPDF_Point(rectWnd.left + 2.0f, rectWnd.top - 2.0f),
+ CPDF_Point(rectWnd.left + 2.0f, rectWnd.bottom + 2.0f),
ArgbEncode(GetTransparency(), 100, 100, 100), 1.0f);
CPWL_Utils::DrawStrokeLine(
pDevice, pUser2Device,
- CFX_FloatPoint(rectWnd.right - 2.0f, rectWnd.top - 2.0f),
- CFX_FloatPoint(rectWnd.right - 2.0f, rectWnd.bottom + 2.0f),
+ CPDF_Point(rectWnd.right - 2.0f, rectWnd.top - 2.0f),
+ CPDF_Point(rectWnd.right - 2.0f, rectWnd.bottom + 2.0f),
ArgbEncode(GetTransparency(), 100, 100, 100), 1.0f);
}
}
-FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (HasFlag(PWS_AUTOTRANSPARENT)) {
@@ -710,29 +696,27 @@ FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CFX_FloatPoint& point,
}
}
- CFX_FloatRect rcMinArea, rcMaxArea;
+ CPDF_Rect rcMinArea, rcMaxArea;
if (m_pPosButton && m_pPosButton->IsVisible()) {
- CFX_FloatRect rcClient = GetClientRect();
- CFX_FloatRect rcPosButton = m_pPosButton->GetWindowRect();
+ CPDF_Rect rcClient = GetClientRect();
+ CPDF_Rect rcPosButton = m_pPosButton->GetWindowRect();
switch (m_sbType) {
case SBT_HSCROLL:
- rcMinArea =
- CFX_FloatRect(rcClient.left + PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.bottom, rcPosButton.left, rcClient.top);
- rcMaxArea = CFX_FloatRect(rcPosButton.right, rcClient.bottom,
- rcClient.right - PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.top);
+ rcMinArea = CPDF_Rect(rcClient.left + PWL_SCROLLBAR_BUTTON_WIDTH,
+ rcClient.bottom, rcPosButton.left, rcClient.top);
+ rcMaxArea = CPDF_Rect(rcPosButton.right, rcClient.bottom,
+ rcClient.right - PWL_SCROLLBAR_BUTTON_WIDTH,
+ rcClient.top);
break;
case SBT_VSCROLL:
- rcMinArea =
- CFX_FloatRect(rcClient.left, rcPosButton.top, rcClient.right,
- rcClient.top - PWL_SCROLLBAR_BUTTON_WIDTH);
- rcMaxArea = CFX_FloatRect(rcClient.left,
- rcClient.bottom + PWL_SCROLLBAR_BUTTON_WIDTH,
- rcClient.right, rcPosButton.bottom);
+ rcMinArea = CPDF_Rect(rcClient.left, rcPosButton.top, rcClient.right,
+ rcClient.top - PWL_SCROLLBAR_BUTTON_WIDTH);
+ rcMaxArea = CPDF_Rect(rcClient.left,
+ rcClient.bottom + PWL_SCROLLBAR_BUTTON_WIDTH,
+ rcClient.right, rcPosButton.bottom);
break;
}
@@ -755,8 +739,7 @@ FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (HasFlag(PWS_AUTOTRANSPARENT)) {
@@ -781,41 +764,41 @@ void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd,
switch (msg) {
case PNM_LBUTTONDOWN:
if (pWnd == m_pMinButton) {
- OnMinButtonLBDown(*(CFX_FloatPoint*)lParam);
+ OnMinButtonLBDown(*(CPDF_Point*)lParam);
}
if (pWnd == m_pMaxButton) {
- OnMaxButtonLBDown(*(CFX_FloatPoint*)lParam);
+ OnMaxButtonLBDown(*(CPDF_Point*)lParam);
}
if (pWnd == m_pPosButton) {
- OnPosButtonLBDown(*(CFX_FloatPoint*)lParam);
+ OnPosButtonLBDown(*(CPDF_Point*)lParam);
}
break;
case PNM_LBUTTONUP:
if (pWnd == m_pMinButton) {
- OnMinButtonLBUp(*(CFX_FloatPoint*)lParam);
+ OnMinButtonLBUp(*(CPDF_Point*)lParam);
}
if (pWnd == m_pMaxButton) {
- OnMaxButtonLBUp(*(CFX_FloatPoint*)lParam);
+ OnMaxButtonLBUp(*(CPDF_Point*)lParam);
}
if (pWnd == m_pPosButton) {
- OnPosButtonLBUp(*(CFX_FloatPoint*)lParam);
+ OnPosButtonLBUp(*(CPDF_Point*)lParam);
}
break;
case PNM_MOUSEMOVE:
if (pWnd == m_pMinButton) {
- OnMinButtonMouseMove(*(CFX_FloatPoint*)lParam);
+ OnMinButtonMouseMove(*(CPDF_Point*)lParam);
}
if (pWnd == m_pMaxButton) {
- OnMaxButtonMouseMove(*(CFX_FloatPoint*)lParam);
+ OnMaxButtonMouseMove(*(CPDF_Point*)lParam);
}
if (pWnd == m_pPosButton) {
- OnPosButtonMouseMove(*(CFX_FloatPoint*)lParam);
+ OnPosButtonMouseMove(*(CPDF_Point*)lParam);
}
break;
case PNM_SETSCROLLINFO: {
@@ -913,8 +896,8 @@ void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh) {
ASSERT(m_pMaxButton);
if (m_pPosButton->IsVisible()) {
- CFX_FloatRect rcClient;
- CFX_FloatRect rcPosArea, rcPosButton;
+ CPDF_Rect rcClient;
+ CPDF_Rect rcPosArea, rcPosButton;
rcClient = GetClientRect();
rcPosArea = GetScrollArea();
@@ -934,8 +917,7 @@ void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh) {
fLeft = fRight - PWL_SCROLLBAR_POSBUTTON_MINWIDTH;
}
- rcPosButton =
- CFX_FloatRect(fLeft, rcPosArea.bottom, fRight, rcPosArea.top);
+ rcPosButton = CPDF_Rect(fLeft, rcPosArea.bottom, fRight, rcPosArea.top);
break;
case SBT_VSCROLL:
@@ -950,8 +932,7 @@ void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh) {
fTop = fBottom + PWL_SCROLLBAR_POSBUTTON_MINWIDTH;
}
- rcPosButton =
- CFX_FloatRect(rcPosArea.left, fBottom, rcPosArea.right, fTop);
+ rcPosButton = CPDF_Rect(rcPosArea.left, fBottom, rcPosArea.right, fTop);
break;
}
@@ -960,7 +941,7 @@ void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh) {
}
}
-void CPWL_ScrollBar::OnMinButtonLBDown(const CFX_FloatPoint& point) {
+void CPWL_ScrollBar::OnMinButtonLBDown(const CPDF_Point& point) {
m_sData.SubSmall();
MovePosButton(TRUE);
NotifyScrollWindow();
@@ -971,11 +952,11 @@ void CPWL_ScrollBar::OnMinButtonLBDown(const CFX_FloatPoint& point) {
BeginTimer(100);
}
-void CPWL_ScrollBar::OnMinButtonLBUp(const CFX_FloatPoint& point) {}
+void CPWL_ScrollBar::OnMinButtonLBUp(const CPDF_Point& point) {}
-void CPWL_ScrollBar::OnMinButtonMouseMove(const CFX_FloatPoint& point) {}
+void CPWL_ScrollBar::OnMinButtonMouseMove(const CPDF_Point& point) {}
-void CPWL_ScrollBar::OnMaxButtonLBDown(const CFX_FloatPoint& point) {
+void CPWL_ScrollBar::OnMaxButtonLBDown(const CPDF_Point& point) {
m_sData.AddSmall();
MovePosButton(TRUE);
NotifyScrollWindow();
@@ -986,15 +967,15 @@ void CPWL_ScrollBar::OnMaxButtonLBDown(const CFX_FloatPoint& point) {
BeginTimer(100);
}
-void CPWL_ScrollBar::OnMaxButtonLBUp(const CFX_FloatPoint& point) {}
+void CPWL_ScrollBar::OnMaxButtonLBUp(const CPDF_Point& point) {}
-void CPWL_ScrollBar::OnMaxButtonMouseMove(const CFX_FloatPoint& point) {}
+void CPWL_ScrollBar::OnMaxButtonMouseMove(const CPDF_Point& point) {}
-void CPWL_ScrollBar::OnPosButtonLBDown(const CFX_FloatPoint& point) {
+void CPWL_ScrollBar::OnPosButtonLBDown(const CPDF_Point& point) {
m_bMouseDown = TRUE;
if (m_pPosButton) {
- CFX_FloatRect rcPosButton = m_pPosButton->GetWindowRect();
+ CPDF_Rect rcPosButton = m_pPosButton->GetWindowRect();
switch (m_sbType) {
case SBT_HSCROLL:
@@ -1009,7 +990,7 @@ void CPWL_ScrollBar::OnPosButtonLBDown(const CFX_FloatPoint& point) {
}
}
-void CPWL_ScrollBar::OnPosButtonLBUp(const CFX_FloatPoint& point) {
+void CPWL_ScrollBar::OnPosButtonLBUp(const CPDF_Point& point) {
if (m_bMouseDown) {
if (!m_bNotifyForever)
NotifyScrollWindow();
@@ -1017,7 +998,7 @@ void CPWL_ScrollBar::OnPosButtonLBUp(const CFX_FloatPoint& point) {
m_bMouseDown = FALSE;
}
-void CPWL_ScrollBar::OnPosButtonMouseMove(const CFX_FloatPoint& point) {
+void CPWL_ScrollBar::OnPosButtonMouseMove(const CPDF_Point& point) {
FX_FLOAT fOldScrollPos = m_sData.fScrollPos;
FX_FLOAT fNewPos = 0;
@@ -1090,15 +1071,15 @@ void CPWL_ScrollBar::NotifyScrollWindow() {
}
}
-CFX_FloatRect CPWL_ScrollBar::GetScrollArea() const {
- CFX_FloatRect rcClient = GetClientRect();
- CFX_FloatRect rcArea;
+CPDF_Rect CPWL_ScrollBar::GetScrollArea() const {
+ CPDF_Rect rcClient = GetClientRect();
+ CPDF_Rect rcArea;
if (!m_pMinButton || !m_pMaxButton)
return rcClient;
- CFX_FloatRect rcMin = m_pMinButton->GetWindowRect();
- CFX_FloatRect rcMax = m_pMaxButton->GetWindowRect();
+ CPDF_Rect rcMin = m_pMinButton->GetWindowRect();
+ CPDF_Rect rcMax = m_pMaxButton->GetWindowRect();
FX_FLOAT fMinWidth = rcMin.right - rcMin.left;
FX_FLOAT fMinHeight = rcMin.top - rcMin.bottom;
@@ -1108,21 +1089,20 @@ CFX_FloatRect CPWL_ScrollBar::GetScrollArea() const {
switch (m_sbType) {
case SBT_HSCROLL:
if (rcClient.right - rcClient.left > fMinWidth + fMaxWidth + 2) {
- rcArea = CFX_FloatRect(rcClient.left + fMinWidth + 1, rcClient.bottom,
- rcClient.right - fMaxWidth - 1, rcClient.top);
+ rcArea = CPDF_Rect(rcClient.left + fMinWidth + 1, rcClient.bottom,
+ rcClient.right - fMaxWidth - 1, rcClient.top);
} else {
- rcArea = CFX_FloatRect(rcClient.left + fMinWidth + 1, rcClient.bottom,
- rcClient.left + fMinWidth + 1, rcClient.top);
+ rcArea = CPDF_Rect(rcClient.left + fMinWidth + 1, rcClient.bottom,
+ rcClient.left + fMinWidth + 1, rcClient.top);
}
break;
case SBT_VSCROLL:
if (rcClient.top - rcClient.bottom > fMinHeight + fMaxHeight + 2) {
- rcArea = CFX_FloatRect(rcClient.left, rcClient.bottom + fMinHeight + 1,
- rcClient.right, rcClient.top - fMaxHeight - 1);
+ rcArea = CPDF_Rect(rcClient.left, rcClient.bottom + fMinHeight + 1,
+ rcClient.right, rcClient.top - fMaxHeight - 1);
} else {
- rcArea =
- CFX_FloatRect(rcClient.left, rcClient.bottom + fMinHeight + 1,
- rcClient.right, rcClient.bottom + fMinHeight + 1);
+ rcArea = CPDF_Rect(rcClient.left, rcClient.bottom + fMinHeight + 1,
+ rcClient.right, rcClient.bottom + fMinHeight + 1);
}
break;
}
@@ -1133,7 +1113,7 @@ CFX_FloatRect CPWL_ScrollBar::GetScrollArea() const {
}
FX_FLOAT CPWL_ScrollBar::TrueToFace(FX_FLOAT fTrue) {
- CFX_FloatRect rcPosArea;
+ CPDF_Rect rcPosArea;
rcPosArea = GetScrollArea();
FX_FLOAT fFactWidth = m_sData.ScrollRange.GetWidth() + m_sData.fClientWidth;
@@ -1156,7 +1136,7 @@ FX_FLOAT CPWL_ScrollBar::TrueToFace(FX_FLOAT fTrue) {
}
FX_FLOAT CPWL_ScrollBar::FaceToTrue(FX_FLOAT fFace) {
- CFX_FloatRect rcPosArea;
+ CPDF_Rect rcPosArea;
rcPosArea = GetScrollArea();
FX_FLOAT fFactWidth = m_sData.ScrollRange.GetWidth() + m_sData.fClientWidth;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index 6b3940de28..f7c73d0a7d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -27,7 +27,7 @@ void CPWL_Signature_Image::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
if (m_pImage) {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
FX_FLOAT x, y;
pUser2Device->Transform(rcClient.left, rcClient.top, x, y);
@@ -48,7 +48,7 @@ void CPWL_Signature_Image::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) {
GetImageSize(fImageW, fImageH);
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
fHScale = rcClient.Width() / fImageW;
fVScale = rcClient.Height() / fImageH;
@@ -107,10 +107,10 @@ void CPWL_Signature::SetImageStream(CPDF_Stream* pStream,
}
void CPWL_Signature::RePosChildWnd() {
- CFX_FloatRect rcClient = GetClientRect();
+ CPDF_Rect rcClient = GetClientRect();
- CFX_FloatRect rcText = rcClient;
- CFX_FloatRect rcDescription = rcClient;
+ CPDF_Rect rcText = rcClient;
+ CPDF_Rect rcDescription = rcClient;
FX_BOOL bTextVisible = m_bTextExist && m_pText->GetText().GetLength() > 0;
diff --git a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
index 44c3ec8a94..52f25fcd84 100644
--- a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
@@ -17,7 +17,7 @@ CFX_ByteString CPWL_PushButton::GetClassName() const {
return "CPWL_PushButton";
}
-CFX_FloatRect CPWL_PushButton::GetFocusRect() const {
+CPDF_Rect CPWL_PushButton::GetFocusRect() const {
return CPWL_Utils::DeflateRect(GetWindowRect(), (FX_FLOAT)GetBorderWidth());
}
@@ -37,8 +37,7 @@ FX_BOOL CPWL_CheckBox::IsChecked() const {
return m_bChecked;
}
-FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
if (IsReadOnly())
return FALSE;
@@ -59,8 +58,7 @@ CFX_ByteString CPWL_RadioButton::GetClassName() const {
return "CPWL_RadioButton";
}
-FX_BOOL CPWL_RadioButton::OnLButtonUp(const CFX_FloatPoint& point,
- FX_DWORD nFlag) {
+FX_BOOL CPWL_RadioButton::OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) {
if (IsReadOnly())
return FALSE;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
index 6cd5786e2e..64ba43dd6b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
@@ -69,9 +69,8 @@ void CPWL_Utils::GetPathDataFromArray(CFX_PathData& path,
}
}
-CFX_FloatRect CPWL_Utils::MaxRect(const CFX_FloatRect& rect1,
- const CFX_FloatRect& rect2) {
- CFX_FloatRect rcRet;
+CPDF_Rect CPWL_Utils::MaxRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2) {
+ CPDF_Rect rcRet;
rcRet.left = PWL_MIN(rect1.left, rect2.left);
rcRet.bottom = PWL_MIN(rect1.bottom, rect2.bottom);
@@ -81,21 +80,21 @@ CFX_FloatRect CPWL_Utils::MaxRect(const CFX_FloatRect& rect1,
return rcRet;
}
-CFX_FloatRect CPWL_Utils::OffsetRect(const CFX_FloatRect& rect,
- FX_FLOAT x,
- FX_FLOAT y) {
- return CFX_FloatRect(rect.left + x, rect.bottom + y, rect.right + x,
- rect.top + y);
+CPDF_Rect CPWL_Utils::OffsetRect(const CPDF_Rect& rect,
+ FX_FLOAT x,
+ FX_FLOAT y) {
+ return CPDF_Rect(rect.left + x, rect.bottom + y, rect.right + x,
+ rect.top + y);
}
-FX_BOOL CPWL_Utils::ContainsRect(const CFX_FloatRect& rcParent,
- const CFX_FloatRect& rcChild) {
+FX_BOOL CPWL_Utils::ContainsRect(const CPDF_Rect& rcParent,
+ const CPDF_Rect& rcChild) {
return rcChild.left >= rcParent.left && rcChild.bottom >= rcParent.bottom &&
rcChild.right <= rcParent.right && rcChild.top <= rcParent.top;
}
-FX_BOOL CPWL_Utils::IntersectRect(const CFX_FloatRect& rect1,
- const CFX_FloatRect& rect2) {
+FX_BOOL CPWL_Utils::IntersectRect(const CPDF_Rect& rect1,
+ const CPDF_Rect& rect2) {
FX_FLOAT left = rect1.left > rect2.left ? rect1.left : rect2.left;
FX_FLOAT right = rect1.right < rect2.right ? rect1.right : rect2.right;
FX_FLOAT bottom = rect1.bottom > rect2.bottom ? rect1.bottom : rect2.bottom;
@@ -104,10 +103,10 @@ FX_BOOL CPWL_Utils::IntersectRect(const CFX_FloatRect& rect1,
return left < right && bottom < top;
}
-CFX_FloatPoint CPWL_Utils::OffsetPoint(const CFX_FloatPoint& point,
- FX_FLOAT x,
- FX_FLOAT y) {
- return CFX_FloatPoint(point.x + x, point.y + y);
+CPDF_Point CPWL_Utils::OffsetPoint(const CPDF_Point& point,
+ FX_FLOAT x,
+ FX_FLOAT y) {
+ return CPDF_Point(point.x + x, point.y + y);
}
CPVT_WordRange CPWL_Utils::OverlapWordRange(const CPVT_WordRange& wr1,
@@ -136,7 +135,7 @@ CPVT_WordRange CPWL_Utils::OverlapWordRange(const CPVT_WordRange& wr1,
return wrRet;
}
-CFX_ByteString CPWL_Utils::GetAP_Check(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Check(const CPDF_Rect& crBBox) {
const FX_FLOAT fWidth = crBBox.right - crBBox.left;
const FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -185,16 +184,16 @@ CFX_ByteString CPWL_Utils::GetAP_Check(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_Circle(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Circle(const CPDF_Rect& crBBox) {
CFX_ByteTextBuf csAP;
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
- CFX_FloatPoint pt1(crBBox.left, crBBox.bottom + fHeight / 2);
- CFX_FloatPoint pt2(crBBox.left + fWidth / 2, crBBox.top);
- CFX_FloatPoint pt3(crBBox.right, crBBox.bottom + fHeight / 2);
- CFX_FloatPoint pt4(crBBox.left + fWidth / 2, crBBox.bottom);
+ CPDF_Point pt1(crBBox.left, crBBox.bottom + fHeight / 2);
+ CPDF_Point pt2(crBBox.left + fWidth / 2, crBBox.top);
+ CPDF_Point pt3(crBBox.right, crBBox.bottom + fHeight / 2);
+ CPDF_Point pt4(crBBox.left + fWidth / 2, crBBox.bottom);
csAP << pt1.x << " " << pt1.y << " m\n";
@@ -227,7 +226,7 @@ CFX_ByteString CPWL_Utils::GetAP_Circle(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_Cross(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Cross(const CPDF_Rect& crBBox) {
CFX_ByteTextBuf csAP;
csAP << crBBox.left << " " << crBBox.top << " m\n";
@@ -238,16 +237,16 @@ CFX_ByteString CPWL_Utils::GetAP_Cross(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_Diamond(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Diamond(const CPDF_Rect& crBBox) {
CFX_ByteTextBuf csAP;
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
- CFX_FloatPoint pt1(crBBox.left, crBBox.bottom + fHeight / 2);
- CFX_FloatPoint pt2(crBBox.left + fWidth / 2, crBBox.top);
- CFX_FloatPoint pt3(crBBox.right, crBBox.bottom + fHeight / 2);
- CFX_FloatPoint pt4(crBBox.left + fWidth / 2, crBBox.bottom);
+ CPDF_Point pt1(crBBox.left, crBBox.bottom + fHeight / 2);
+ CPDF_Point pt2(crBBox.left + fWidth / 2, crBBox.top);
+ CPDF_Point pt3(crBBox.right, crBBox.bottom + fHeight / 2);
+ CPDF_Point pt4(crBBox.left + fWidth / 2, crBBox.bottom);
csAP << pt1.x << " " << pt1.y << " m\n";
csAP << pt2.x << " " << pt2.y << " l\n";
@@ -258,7 +257,7 @@ CFX_ByteString CPWL_Utils::GetAP_Diamond(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_Square(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Square(const CPDF_Rect& crBBox) {
CFX_ByteTextBuf csAP;
csAP << crBBox.left << " " << crBBox.top << " m\n";
@@ -270,13 +269,13 @@ CFX_ByteString CPWL_Utils::GetAP_Square(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_Star(const CFX_FloatRect& crBBox) {
+CFX_ByteString CPWL_Utils::GetAP_Star(const CPDF_Rect& crBBox) {
CFX_ByteTextBuf csAP;
FX_FLOAT fRadius =
(crBBox.top - crBBox.bottom) / (1 + (FX_FLOAT)cos(FX_PI / 5.0f));
- CFX_FloatPoint ptCenter = CFX_FloatPoint((crBBox.left + crBBox.right) / 2.0f,
- (crBBox.top + crBBox.bottom) / 2.0f);
+ CPDF_Point ptCenter = CPDF_Point((crBBox.left + crBBox.right) / 2.0f,
+ (crBBox.top + crBBox.bottom) / 2.0f);
FX_FLOAT px[5], py[5];
@@ -302,16 +301,16 @@ CFX_ByteString CPWL_Utils::GetAP_Star(const CFX_FloatRect& crBBox) {
return csAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CFX_FloatRect& crBBox,
+CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CPDF_Rect& crBBox,
FX_FLOAT fRotate) {
CFX_ByteTextBuf csAP;
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
- CFX_FloatPoint pt1(-fWidth / 2, 0);
- CFX_FloatPoint pt2(0, fHeight / 2);
- CFX_FloatPoint pt3(fWidth / 2, 0);
+ CPDF_Point pt1(-fWidth / 2, 0);
+ CPDF_Point pt2(0, fHeight / 2);
+ CPDF_Point pt3(fWidth / 2, 0);
FX_FLOAT px, py;
@@ -337,42 +336,39 @@ CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CFX_FloatRect& crBBox,
return csAP.GetByteString();
}
-CFX_FloatRect CPWL_Utils::InflateRect(const CFX_FloatRect& rcRect,
- FX_FLOAT fSize) {
+CPDF_Rect CPWL_Utils::InflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize) {
if (rcRect.IsEmpty())
return rcRect;
- CFX_FloatRect rcNew(rcRect.left - fSize, rcRect.bottom - fSize,
- rcRect.right + fSize, rcRect.top + fSize);
+ CPDF_Rect rcNew(rcRect.left - fSize, rcRect.bottom - fSize,
+ rcRect.right + fSize, rcRect.top + fSize);
rcNew.Normalize();
return rcNew;
}
-CFX_FloatRect CPWL_Utils::DeflateRect(const CFX_FloatRect& rcRect,
- FX_FLOAT fSize) {
+CPDF_Rect CPWL_Utils::DeflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize) {
if (rcRect.IsEmpty())
return rcRect;
- CFX_FloatRect rcNew(rcRect.left + fSize, rcRect.bottom + fSize,
- rcRect.right - fSize, rcRect.top - fSize);
+ CPDF_Rect rcNew(rcRect.left + fSize, rcRect.bottom + fSize,
+ rcRect.right - fSize, rcRect.top - fSize);
rcNew.Normalize();
return rcNew;
}
-CFX_FloatRect CPWL_Utils::ScaleRect(const CFX_FloatRect& rcRect,
- FX_FLOAT fScale) {
+CPDF_Rect CPWL_Utils::ScaleRect(const CPDF_Rect& rcRect, FX_FLOAT fScale) {
FX_FLOAT fHalfWidth = (rcRect.right - rcRect.left) / 2.0f;
FX_FLOAT fHalfHeight = (rcRect.top - rcRect.bottom) / 2.0f;
- CFX_FloatPoint ptCenter = CFX_FloatPoint((rcRect.left + rcRect.right) / 2,
- (rcRect.top + rcRect.bottom) / 2);
+ CPDF_Point ptCenter = CPDF_Point((rcRect.left + rcRect.right) / 2,
+ (rcRect.top + rcRect.bottom) / 2);
- return CFX_FloatRect(
+ return CPDF_Rect(
ptCenter.x - fHalfWidth * fScale, ptCenter.y - fHalfHeight * fScale,
ptCenter.x + fHalfWidth * fScale, ptCenter.y + fHalfHeight * fScale);
}
-CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect,
+CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CPDF_Rect& rect,
const CPWL_Color& color) {
CFX_ByteTextBuf sAppStream;
@@ -387,7 +383,7 @@ CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect,
return sAppStream.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CFX_FloatRect& rect,
+CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CPDF_Rect& rect,
const CPWL_Color& color) {
CFX_ByteTextBuf sAppStream;
@@ -399,7 +395,7 @@ CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CFX_FloatRect& rect,
return sAppStream.GetByteString();
}
-CFX_FloatRect CPWL_Utils::GetCenterSquare(const CFX_FloatRect& rect) {
+CPDF_Rect CPWL_Utils::GetCenterSquare(const CPDF_Rect& rect) {
FX_FLOAT fWidth = rect.right - rect.left;
FX_FLOAT fHeight = rect.top - rect.bottom;
@@ -408,12 +404,12 @@ CFX_FloatRect CPWL_Utils::GetCenterSquare(const CFX_FloatRect& rect) {
FX_FLOAT fRadius = (fWidth > fHeight) ? fHeight / 2 : fWidth / 2;
- return CFX_FloatRect(fCenterX - fRadius, fCenterY - fRadius,
- fCenterX + fRadius, fCenterY + fRadius);
+ return CPDF_Rect(fCenterX - fRadius, fCenterY - fRadius, fCenterX + fRadius,
+ fCenterY + fRadius);
}
CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange,
FX_BOOL bContinuous,
FX_WORD SubWord) {
@@ -422,7 +418,7 @@ CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit,
}
CFX_ByteString CPWL_Utils::GetEditSelAppStream(IFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange) {
return IFX_Edit::GetSelectAppearanceStream(pEdit, ptOffset, pRange);
}
@@ -449,7 +445,7 @@ static CFX_ByteString GetSquigglyAppearanceStream(FX_FLOAT fStartX,
static CFX_ByteString GetWordSpellCheckAppearanceStream(
IFX_Edit_Iterator* pIterator,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Point& ptOffset,
const CPVT_WordRange& wrWord) {
CFX_ByteTextBuf sRet;
@@ -508,7 +504,7 @@ static CFX_ByteString GetWordSpellCheckAppearanceStream(
CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(
IFX_Edit* pEdit,
IPWL_SpellCheck* pSpellCheck,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange) {
CFX_ByteTextBuf sRet;
@@ -573,7 +569,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(
return sRet.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetTextAppStream(const CPDF_Rect& rcBBox,
IFX_Edit_FontMap* pFontMap,
const CFX_WideString& sText,
int32_t nAlignmentH,
@@ -600,7 +596,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox,
pEdit->SetText(sText.c_str());
CFX_ByteString sEdit =
- CPWL_Utils::GetEditAppStream(pEdit, CFX_FloatPoint(0.0f, 0.0f));
+ CPWL_Utils::GetEditAppStream(pEdit, CPDF_Point(0.0f, 0.0f));
if (sEdit.GetLength() > 0) {
sRet << "BT\n" << CPWL_Utils::GetColorAppStream(crText) << sEdit
<< "ET\n";
@@ -611,7 +607,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox,
return sRet.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect& rcBBox,
IFX_Edit_FontMap* pFontMap,
CPDF_Stream* pIconStream,
CPDF_IconFit& IconFit,
@@ -635,7 +631,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
pEdit->Initialize();
pEdit->SetText(sLabel.c_str());
- CFX_FloatRect rcLabelContent = pEdit->GetContentRect();
+ CPDF_Rect rcLabelContent = pEdit->GetContentRect();
CPWL_Icon Icon;
PWL_CREATEPARAM cp;
cp.dwFlags = PWS_VISIBLE;
@@ -643,45 +639,45 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
Icon.SetIconFit(&IconFit);
Icon.SetPDFStream(pIconStream);
- CFX_FloatRect rcLabel = CFX_FloatRect(0, 0, 0, 0);
- CFX_FloatRect rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ CPDF_Rect rcLabel = CPDF_Rect(0, 0, 0, 0);
+ CPDF_Rect rcIcon = CPDF_Rect(0, 0, 0, 0);
FX_FLOAT fWidth = 0.0f;
FX_FLOAT fHeight = 0.0f;
switch (nLayOut) {
case PPBL_LABEL:
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
break;
case PPBL_ICON:
rcIcon = rcBBox;
- rcLabel = CFX_FloatRect(0, 0, 0, 0);
+ rcLabel = CPDF_Rect(0, 0, 0, 0);
break;
case PPBL_ICONTOPLABELBOTTOM:
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
fHeight = rcBBox.top - rcBBox.bottom;
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcBBox.right,
- rcBBox.bottom + fHeight * fAutoFontScale);
- rcIcon = CFX_FloatRect(rcBBox.left, rcLabel.top, rcBBox.right,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcBBox.right,
+ rcBBox.bottom + fHeight * fAutoFontScale);
+ rcIcon =
+ CPDF_Rect(rcBBox.left, rcLabel.top, rcBBox.right, rcBBox.top);
} else {
fHeight = rcLabelContent.Height();
if (rcBBox.bottom + fHeight > rcBBox.top) {
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
rcLabel = rcBBox;
} else {
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcBBox.right,
- rcBBox.bottom + fHeight);
- rcIcon = CFX_FloatRect(rcBBox.left, rcLabel.top, rcBBox.right,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcBBox.right,
+ rcBBox.bottom + fHeight);
+ rcIcon =
+ CPDF_Rect(rcBBox.left, rcLabel.top, rcBBox.right, rcBBox.top);
}
}
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
break;
@@ -690,27 +686,27 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
fHeight = rcBBox.top - rcBBox.bottom;
- rcLabel = CFX_FloatRect(rcBBox.left,
- rcBBox.top - fHeight * fAutoFontScale,
- rcBBox.right, rcBBox.top);
- rcIcon = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcBBox.right,
- rcLabel.bottom);
+ rcLabel =
+ CPDF_Rect(rcBBox.left, rcBBox.top - fHeight * fAutoFontScale,
+ rcBBox.right, rcBBox.top);
+ rcIcon = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcBBox.right,
+ rcLabel.bottom);
} else {
fHeight = rcLabelContent.Height();
if (rcBBox.bottom + fHeight > rcBBox.top) {
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
rcLabel = rcBBox;
} else {
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.top - fHeight,
- rcBBox.right, rcBBox.top);
- rcIcon = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcBBox.right,
- rcLabel.bottom);
+ rcLabel = CPDF_Rect(rcBBox.left, rcBBox.top - fHeight,
+ rcBBox.right, rcBBox.top);
+ rcIcon = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcBBox.right,
+ rcLabel.bottom);
}
}
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
break;
@@ -719,22 +715,21 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
fWidth = rcBBox.right - rcBBox.left;
- rcLabel = CFX_FloatRect(rcBBox.right - fWidth * fAutoFontScale,
- rcBBox.bottom, rcBBox.right, rcBBox.top);
- rcIcon = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcLabel.left,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.right - fWidth * fAutoFontScale,
+ rcBBox.bottom, rcBBox.right, rcBBox.top);
+ rcIcon =
+ CPDF_Rect(rcBBox.left, rcBBox.bottom, rcLabel.left, rcBBox.top);
if (rcLabelContent.Width() < fWidth * fAutoFontScale) {
} else {
if (rcLabelContent.Width() < fWidth) {
- rcLabel =
- CFX_FloatRect(rcBBox.right - rcLabelContent.Width(),
- rcBBox.bottom, rcBBox.right, rcBBox.top);
- rcIcon = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcLabel.left,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.right - rcLabelContent.Width(),
+ rcBBox.bottom, rcBBox.right, rcBBox.top);
+ rcIcon = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcLabel.left,
+ rcBBox.top);
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
}
} else {
@@ -742,17 +737,17 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (rcBBox.left + fWidth > rcBBox.right) {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
} else {
- rcLabel = CFX_FloatRect(rcBBox.right - fWidth, rcBBox.bottom,
- rcBBox.right, rcBBox.top);
- rcIcon = CFX_FloatRect(rcBBox.left, rcBBox.bottom, rcLabel.left,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.right - fWidth, rcBBox.bottom,
+ rcBBox.right, rcBBox.top);
+ rcIcon = CPDF_Rect(rcBBox.left, rcBBox.bottom, rcLabel.left,
+ rcBBox.top);
}
}
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
break;
@@ -761,23 +756,23 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (pIconStream) {
if (IsFloatZero(fFontSize)) {
fWidth = rcBBox.right - rcBBox.left;
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom,
- rcBBox.left + fWidth * fAutoFontScale,
- rcBBox.top);
- rcIcon = CFX_FloatRect(rcLabel.right, rcBBox.bottom, rcBBox.right,
- rcBBox.top);
+ rcLabel =
+ CPDF_Rect(rcBBox.left, rcBBox.bottom,
+ rcBBox.left + fWidth * fAutoFontScale, rcBBox.top);
+ rcIcon = CPDF_Rect(rcLabel.right, rcBBox.bottom, rcBBox.right,
+ rcBBox.top);
if (rcLabelContent.Width() < fWidth * fAutoFontScale) {
} else {
if (rcLabelContent.Width() < fWidth) {
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom,
- rcBBox.left + rcLabelContent.Width(),
- rcBBox.top);
- rcIcon = CFX_FloatRect(rcLabel.right, rcBBox.bottom,
- rcBBox.right, rcBBox.top);
+ rcLabel =
+ CPDF_Rect(rcBBox.left, rcBBox.bottom,
+ rcBBox.left + rcLabelContent.Width(), rcBBox.top);
+ rcIcon = CPDF_Rect(rcLabel.right, rcBBox.bottom, rcBBox.right,
+ rcBBox.top);
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
}
} else {
@@ -785,17 +780,17 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (rcBBox.left + fWidth > rcBBox.right) {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
} else {
- rcLabel = CFX_FloatRect(rcBBox.left, rcBBox.bottom,
- rcBBox.left + fWidth, rcBBox.top);
- rcIcon = CFX_FloatRect(rcLabel.right, rcBBox.bottom, rcBBox.right,
- rcBBox.top);
+ rcLabel = CPDF_Rect(rcBBox.left, rcBBox.bottom,
+ rcBBox.left + fWidth, rcBBox.top);
+ rcIcon = CPDF_Rect(rcLabel.right, rcBBox.bottom, rcBBox.right,
+ rcBBox.top);
}
}
} else {
rcLabel = rcBBox;
- rcIcon = CFX_FloatRect(0, 0, 0, 0);
+ rcIcon = CPDF_Rect(0, 0, 0, 0);
}
break;
@@ -817,7 +812,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
if (!rcLabel.IsEmpty()) {
pEdit->SetPlateRect(rcLabel);
CFX_ByteString sEdit =
- CPWL_Utils::GetEditAppStream(pEdit, CFX_FloatPoint(0.0f, 0.0f));
+ CPWL_Utils::GetEditAppStream(pEdit, CPDF_Point(0.0f, 0.0f));
if (sEdit.GetLength() > 0) {
sTemp << "BT\n" << CPWL_Utils::GetColorAppStream(crText) << sEdit
<< "ET\n";
@@ -863,7 +858,7 @@ CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color& color,
return sColorStream.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect,
+CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect& rect,
FX_FLOAT fWidth,
const CPWL_Color& color,
const CPWL_Color& crLeftTop,
@@ -980,7 +975,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect,
}
CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
FX_FLOAT fWidth,
const CPWL_Color& color,
const CPWL_Color& crLeftTop,
@@ -1129,7 +1124,7 @@ CPWL_Color CPWL_Utils::DevideColor(const CPWL_Color& sColor,
return sRet;
}
-CFX_ByteString CPWL_Utils::GetAppStream_Check(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Check(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE)
@@ -1137,7 +1132,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Check(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE)
@@ -1145,7 +1140,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, FALSE)
@@ -1153,7 +1148,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText, TRUE)
@@ -1161,7 +1156,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Square(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE)
@@ -1169,7 +1164,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetAppStream_Star(const CPDF_Rect& rcBBox,
const CPWL_Color& crText) {
CFX_ByteTextBuf sAP;
sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE)
@@ -1177,10 +1172,10 @@ CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox,
return sAP.GetByteString();
}
-CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CPDF_Rect& rcBBox,
int32_t nStyle,
const CPWL_Color& crText) {
- CFX_FloatRect rcCenter = GetCenterSquare(rcBBox);
+ CPDF_Rect rcCenter = GetCenterSquare(rcBBox);
switch (nStyle) {
default:
case PCS_CHECK:
@@ -1198,10 +1193,10 @@ CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CFX_FloatRect& rcBBox,
}
}
-CFX_ByteString CPWL_Utils::GetRadioButtonAppStream(const CFX_FloatRect& rcBBox,
+CFX_ByteString CPWL_Utils::GetRadioButtonAppStream(const CPDF_Rect& rcBBox,
int32_t nStyle,
const CPWL_Color& crText) {
- CFX_FloatRect rcCenter = GetCenterSquare(rcBBox);
+ CPDF_Rect rcCenter = GetCenterSquare(rcBBox);
switch (nStyle) {
default:
case PCS_CHECK:
@@ -1219,7 +1214,7 @@ CFX_ByteString CPWL_Utils::GetRadioButtonAppStream(const CFX_FloatRect& rcBBox,
}
}
-CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CFX_FloatRect& rcBBox) {
+CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CPDF_Rect& rcBBox) {
CFX_ByteTextBuf sAppStream;
if (!rcBBox.IsEmpty()) {
@@ -1239,8 +1234,8 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CFX_FloatRect& rcBBox) {
CPWL_Dash(3, 0, 0))
<< "Q\n";
- CFX_FloatPoint ptCenter = CFX_FloatPoint((rcBBox.left + rcBBox.right) / 2,
- (rcBBox.top + rcBBox.bottom) / 2);
+ CPDF_Point ptCenter = CPDF_Point((rcBBox.left + rcBBox.right) / 2,
+ (rcBBox.top + rcBBox.bottom) / 2);
if (IsFloatBigger(rcBBox.right - rcBBox.left, 6) &&
IsFloatBigger(rcBBox.top - rcBBox.bottom, 6)) {
sAppStream << "q\n"
@@ -1370,17 +1365,17 @@ FX_COLORREF CPWL_Utils::PWLColorToFXColor(const CPWL_Color& color,
void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
const FX_COLORREF& color) {
CFX_PathData path;
- CFX_FloatRect rcTemp(rect);
+ CPDF_Rect rcTemp(rect);
path.AppendRect(rcTemp.left, rcTemp.bottom, rcTemp.right, rcTemp.top);
pDevice->DrawPath(&path, pUser2Device, NULL, color, 0, FXFILL_WINDING);
}
void CPWL_Utils::DrawFillArea(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatPoint* pPts,
+ const CPDF_Point* pPts,
int32_t nCount,
const FX_COLORREF& color) {
CFX_PathData path;
@@ -1395,11 +1390,11 @@ void CPWL_Utils::DrawFillArea(CFX_RenderDevice* pDevice,
void CPWL_Utils::DrawStrokeRect(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
const FX_COLORREF& color,
FX_FLOAT fWidth) {
CFX_PathData path;
- CFX_FloatRect rcTemp(rect);
+ CPDF_Rect rcTemp(rect);
path.AppendRect(rcTemp.left, rcTemp.bottom, rcTemp.right, rcTemp.top);
CFX_GraphStateData gsd;
@@ -1410,8 +1405,8 @@ void CPWL_Utils::DrawStrokeRect(CFX_RenderDevice* pDevice,
void CPWL_Utils::DrawStrokeLine(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatPoint& ptMoveTo,
- const CFX_FloatPoint& ptLineTo,
+ const CPDF_Point& ptMoveTo,
+ const CPDF_Point& ptLineTo,
const FX_COLORREF& color,
FX_FLOAT fWidth) {
CFX_PathData path;
@@ -1427,7 +1422,7 @@ void CPWL_Utils::DrawStrokeLine(CFX_RenderDevice* pDevice,
void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
const CPWL_Color& color,
int32_t nTransparancy) {
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rect,
@@ -1438,7 +1433,7 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
FX_BOOL bVertical,
FX_BOOL bHorizontal,
- CFX_FloatRect rect,
+ CPDF_Rect rect,
int32_t nTransparancy,
int32_t nStartGray,
int32_t nEndGray) {
@@ -1450,8 +1445,8 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice,
for (FX_FLOAT fy = rect.bottom + 0.5f; fy <= rect.top - 0.5f; fy += 1.0f) {
int32_t nGray = nStartGray + (int32_t)(fStepGray * (fy - rect.bottom));
CPWL_Utils::DrawStrokeLine(
- pDevice, pUser2Device, CFX_FloatPoint(rect.left, fy),
- CFX_FloatPoint(rect.right, fy),
+ pDevice, pUser2Device, CPDF_Point(rect.left, fy),
+ CPDF_Point(rect.right, fy),
ArgbEncode(nTransparancy, nGray, nGray, nGray), 1.5f);
}
}
@@ -1462,8 +1457,8 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice,
for (FX_FLOAT fx = rect.left + 0.5f; fx <= rect.right - 0.5f; fx += 1.0f) {
int32_t nGray = nStartGray + (int32_t)(fStepGray * (fx - rect.left));
CPWL_Utils::DrawStrokeLine(
- pDevice, pUser2Device, CFX_FloatPoint(fx, rect.bottom),
- CFX_FloatPoint(fx, rect.top),
+ pDevice, pUser2Device, CPDF_Point(fx, rect.bottom),
+ CPDF_Point(fx, rect.top),
ArgbEncode(nTransparancy, nGray, nGray, nGray), 1.5f);
}
}
@@ -1471,7 +1466,7 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice,
void CPWL_Utils::DrawBorder(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
FX_FLOAT fWidth,
const CPWL_Color& color,
const CPWL_Color& crLeftTop,
@@ -1678,8 +1673,8 @@ static void AddSpellCheckObj(CFX_PathData& PathData,
void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
IFX_Edit* pEdit,
- const CFX_FloatRect& rcClip,
- const CFX_FloatPoint& ptOffset,
+ const CPDF_Rect& rcClip,
+ const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange,
IPWL_SpellCheck* pSpellCheck) {
const FX_COLORREF crSpell = ArgbEncode(255, 255, 0, 0);
@@ -1694,7 +1689,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice,
pDevice->SaveState();
if (!rcClip.IsEmpty()) {
- CFX_FloatRect rcTemp = rcClip;
+ CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
rcDevClip.left = (int32_t)rcTemp.left;
@@ -1817,7 +1812,7 @@ CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color) {
}
CFX_ByteString CPWL_Utils::GetIconAppStream(int32_t nType,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
const CPWL_Color& crFill,
const CPWL_Color& crStroke) {
CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, FALSE);
@@ -1901,7 +1896,7 @@ CFX_ByteString CPWL_Utils::GetIconAppStream(int32_t nType,
void CPWL_Utils::DrawIconAppStream(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
int32_t nType,
- const CFX_FloatRect& rect,
+ const CPDF_Rect& rect,
const CPWL_Color& crFill,
const CPWL_Color& crStroke,
const int32_t nTransparancy) {
@@ -1983,7 +1978,7 @@ void CPWL_Utils::DrawIconAppStream(CFX_RenderDevice* pDevice,
void CPWL_Utils::GetGraphics_Checkmark(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2070,7 +2065,7 @@ void CPWL_Utils::GetGraphics_Checkmark(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Circle(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2193,7 +2188,7 @@ void CPWL_Utils::GetGraphics_Circle(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Comment(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2312,7 +2307,7 @@ void CPWL_Utils::GetGraphics_Comment(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Cross(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2369,7 +2364,7 @@ void CPWL_Utils::GetGraphics_Cross(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Help(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2599,7 +2594,7 @@ void CPWL_Utils::GetGraphics_Help(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_InsertText(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2626,7 +2621,7 @@ void CPWL_Utils::GetGraphics_InsertText(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Key(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2757,7 +2752,7 @@ void CPWL_Utils::GetGraphics_Key(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_NewParagraph(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2861,7 +2856,7 @@ void CPWL_Utils::GetGraphics_NewParagraph(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_TextNote(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2927,7 +2922,7 @@ void CPWL_Utils::GetGraphics_TextNote(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Paragraph(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -2978,7 +2973,7 @@ void CPWL_Utils::GetGraphics_Paragraph(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_RightArrow(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3023,7 +3018,7 @@ void CPWL_Utils::GetGraphics_RightArrow(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_RightPointer(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3053,14 +3048,14 @@ void CPWL_Utils::GetGraphics_RightPointer(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Star(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fLongRadius =
(crBBox.top - crBBox.bottom) / (1 + (FX_FLOAT)cos(FX_PI / 5.0f));
fLongRadius = fLongRadius * 0.7f;
FX_FLOAT fShortRadius = fLongRadius * 0.55f;
- CFX_FloatPoint ptCenter = CFX_FloatPoint((crBBox.left + crBBox.right) / 2.0f,
- (crBBox.top + crBBox.bottom) / 2.0f);
+ CPDF_Point ptCenter = CPDF_Point((crBBox.left + crBBox.right) / 2.0f,
+ (crBBox.top + crBBox.bottom) / 2.0f);
FX_FLOAT px1[5], py1[5];
FX_FLOAT px2[5], py2[5];
@@ -3104,7 +3099,7 @@ void CPWL_Utils::GetGraphics_Star(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_UpArrow(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3143,7 +3138,7 @@ void CPWL_Utils::GetGraphics_UpArrow(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_UpLeftArrow(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3198,7 +3193,7 @@ void CPWL_Utils::GetGraphics_UpLeftArrow(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Graph(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3276,7 +3271,7 @@ void CPWL_Utils::GetGraphics_Graph(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Paperclip(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3419,7 +3414,7 @@ void CPWL_Utils::GetGraphics_Paperclip(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Attachment(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3515,7 +3510,7 @@ void CPWL_Utils::GetGraphics_Attachment(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Tag(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
@@ -3566,12 +3561,12 @@ void CPWL_Utils::GetGraphics_Tag(CFX_ByteString& sPathData,
void CPWL_Utils::GetGraphics_Foxit(CFX_ByteString& sPathData,
CFX_PathData& path,
- const CFX_FloatRect& crBBox,
+ const CPDF_Rect& crBBox,
const PWL_PATH_TYPE type) {
FX_FLOAT fOutWidth = crBBox.right - crBBox.left;
FX_FLOAT fOutHeight = crBBox.top - crBBox.bottom;
- CFX_FloatRect crInBox = crBBox;
+ CPDF_Rect crInBox = crBBox;
crInBox.left = crBBox.left + fOutWidth * 0.08f;
crInBox.right = crBBox.right - fOutWidth * 0.08f;
crInBox.top = crBBox.top - fOutHeight * 0.08f;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index 28bd0e04ed..d0aaa78ea4 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -273,11 +273,9 @@ void CPWL_Wnd::Destroy() {
m_pVScrollBar = NULL;
}
-void CPWL_Wnd::Move(const CFX_FloatRect& rcNew,
- FX_BOOL bReset,
- FX_BOOL bRefresh) {
+void CPWL_Wnd::Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh) {
if (IsValid()) {
- CFX_FloatRect rcOld = GetWindowRect();
+ CPDF_Rect rcOld = GetWindowRect();
m_rcWindow = rcNew;
m_rcWindow.Normalize();
@@ -296,9 +294,9 @@ void CPWL_Wnd::Move(const CFX_FloatRect& rcNew,
}
}
-void CPWL_Wnd::InvalidateRectMove(const CFX_FloatRect& rcOld,
- const CFX_FloatRect& rcNew) {
- CFX_FloatRect rcUnion = rcOld;
+void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect& rcOld,
+ const CPDF_Rect& rcNew) {
+ CPDF_Rect rcUnion = rcOld;
rcUnion.Union(rcNew);
InvalidateRect(&rcUnion);
@@ -313,7 +311,7 @@ void CPWL_Wnd::GetAppearanceStream(CFX_ByteTextBuf& sAppStream) {
// if don't set,Get default apperance stream
void CPWL_Wnd::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (!rectWnd.IsEmpty()) {
CFX_ByteTextBuf sThis;
@@ -350,10 +348,10 @@ void CPWL_Wnd::DrawAppearance(CFX_RenderDevice* pDevice,
void CPWL_Wnd::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) {
- CFX_FloatRect rectWnd = GetWindowRect();
+ CPDF_Rect rectWnd = GetWindowRect();
if (!rectWnd.IsEmpty()) {
if (HasFlag(PWS_BACKGROUND)) {
- CFX_FloatRect rcClient = CPWL_Utils::DeflateRect(
+ CPDF_Rect rcClient = CPWL_Utils::DeflateRect(
rectWnd, (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcClient,
GetBackgroundColor(), GetTransparency());
@@ -383,12 +381,12 @@ void CPWL_Wnd::DrawChildAppearance(CFX_RenderDevice* pDevice,
}
}
-void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
+void CPWL_Wnd::InvalidateRect(CPDF_Rect* pRect) {
if (IsValid()) {
- CFX_FloatRect rcRefresh = pRect ? *pRect : GetWindowRect();
+ CPDF_Rect rcRefresh = pRect ? *pRect : GetWindowRect();
if (!HasFlag(PWS_NOREFRESHCLIP)) {
- CFX_FloatRect rcClip = GetClipRect();
+ CPDF_Rect rcClip = GetClipRect();
if (!rcClip.IsEmpty()) {
rcRefresh.Intersect(rcClip);
}
@@ -425,7 +423,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
}
#define PWL_IMPLEMENT_MOUSE_METHOD(mouse_method_name) \
- FX_BOOL CPWL_Wnd::mouse_method_name(const CFX_FloatPoint& point, \
+ FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point& point, \
FX_DWORD nFlag) { \
if (IsValid() && IsVisible() && IsEnabled()) { \
if (IsWndCaptureMouse(this)) { \
@@ -469,7 +467,7 @@ PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonUp)
PWL_IMPLEMENT_MOUSE_METHOD(OnMouseMove)
FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta,
- const CFX_FloatPoint& point,
+ const CPDF_Point& point,
FX_DWORD nFlag) {
if (IsValid() && IsVisible() && IsEnabled()) {
SetCursor();
@@ -530,25 +528,25 @@ CPWL_Wnd* CPWL_Wnd::GetParentWindow() const {
return m_sPrivateParam.pParentWnd;
}
-CFX_FloatRect CPWL_Wnd::GetWindowRect() const {
+CPDF_Rect CPWL_Wnd::GetWindowRect() const {
return m_rcWindow;
}
-CFX_FloatRect CPWL_Wnd::GetClientRect() const {
- CFX_FloatRect rcWindow = GetWindowRect();
- CFX_FloatRect rcClient = CPWL_Utils::DeflateRect(
+CPDF_Rect CPWL_Wnd::GetClientRect() const {
+ CPDF_Rect rcWindow = GetWindowRect();
+ CPDF_Rect rcClient = CPWL_Utils::DeflateRect(
rcWindow, (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
if (CPWL_ScrollBar* pVSB = GetVScrollBar())
rcClient.right -= pVSB->GetScrollBarWidth();
rcClient.Normalize();
- return rcWindow.Contains(rcClient) ? rcClient : CFX_FloatRect();
+ return rcWindow.Contains(rcClient) ? rcClient : CPDF_Rect();
}
-CFX_FloatPoint CPWL_Wnd::GetCenterPoint() const {
- CFX_FloatRect rcClient = GetClientRect();
- return CFX_FloatPoint((rcClient.left + rcClient.right) * 0.5f,
- (rcClient.top + rcClient.bottom) * 0.5f);
+CPDF_Point CPWL_Wnd::GetCenterPoint() const {
+ CPDF_Rect rcClient = GetClientRect();
+ return CPDF_Point((rcClient.left + rcClient.right) * 0.5f,
+ (rcClient.top + rcClient.bottom) * 0.5f);
}
FX_BOOL CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const {
@@ -684,11 +682,11 @@ void CPWL_Wnd::OnSetFocus() {}
void CPWL_Wnd::OnKillFocus() {}
-FX_BOOL CPWL_Wnd::WndHitTest(const CFX_FloatPoint& point) const {
+FX_BOOL CPWL_Wnd::WndHitTest(const CPDF_Point& point) const {
return IsValid() && IsVisible() && GetWindowRect().Contains(point.x, point.y);
}
-FX_BOOL CPWL_Wnd::ClientHitTest(const CFX_FloatPoint& point) const {
+FX_BOOL CPWL_Wnd::ClientHitTest(const CPDF_Point& point) const {
return IsValid() && IsVisible() && GetClientRect().Contains(point.x, point.y);
}
@@ -715,12 +713,12 @@ void CPWL_Wnd::SetVisible(FX_BOOL bVisible) {
}
}
-void CPWL_Wnd::SetClipRect(const CFX_FloatRect& rect) {
+void CPWL_Wnd::SetClipRect(const CPDF_Rect& rect) {
m_rcClip = rect;
m_rcClip.Normalize();
}
-const CFX_FloatRect& CPWL_Wnd::GetClipRect() const {
+const CPDF_Rect& CPWL_Wnd::GetClipRect() const {
return m_rcClip;
}
@@ -729,14 +727,14 @@ FX_BOOL CPWL_Wnd::IsReadOnly() const {
}
void CPWL_Wnd::RePosChildWnd() {
- CFX_FloatRect rcContent = CPWL_Utils::DeflateRect(
+ CPDF_Rect rcContent = CPWL_Utils::DeflateRect(
GetWindowRect(), (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
CPWL_ScrollBar* pVSB = GetVScrollBar();
- CFX_FloatRect rcVScroll =
- CFX_FloatRect(rcContent.right - PWL_SCROLLBAR_WIDTH, rcContent.bottom,
- rcContent.right - 1.0f, rcContent.top);
+ CPDF_Rect rcVScroll =
+ CPDF_Rect(rcContent.right - PWL_SCROLLBAR_WIDTH, rcContent.bottom,
+ rcContent.right - 1.0f, rcContent.top);
if (pVSB)
pVSB->Move(rcVScroll, TRUE, FALSE);
@@ -793,7 +791,7 @@ FX_BOOL CPWL_Wnd::IsFocused() const {
return FALSE;
}
-CFX_FloatRect CPWL_Wnd::GetFocusRect() const {
+CPDF_Rect CPWL_Wnd::GetFocusRect() const {
return CPWL_Utils::InflateRect(GetWindowRect(), 1);
}
@@ -888,18 +886,16 @@ CFX_Matrix CPWL_Wnd::GetWindowMatrix() const {
return mt;
}
-void CPWL_Wnd::PWLtoWnd(const CFX_FloatPoint& point,
- int32_t& x,
- int32_t& y) const {
+void CPWL_Wnd::PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const {
CFX_Matrix mt = GetWindowMatrix();
- CFX_FloatPoint pt = point;
+ CPDF_Point pt = point;
mt.Transform(pt.x, pt.y);
x = (int32_t)(pt.x + 0.5);
y = (int32_t)(pt.y + 0.5);
}
-FX_RECT CPWL_Wnd::PWLtoWnd(const CFX_FloatRect& rect) const {
- CFX_FloatRect rcTemp = rect;
+FX_RECT CPWL_Wnd::PWLtoWnd(const CPDF_Rect& rect) const {
+ CPDF_Rect rcTemp = rect;
CFX_Matrix mt = GetWindowMatrix();
mt.TransformRect(rcTemp);
return FX_RECT((int32_t)(rcTemp.left + 0.5), (int32_t)(rcTemp.bottom + 0.5),
@@ -910,44 +906,44 @@ FX_HWND CPWL_Wnd::GetAttachedHWnd() const {
return m_sPrivateParam.hAttachedWnd;
}
-CFX_FloatPoint CPWL_Wnd::ChildToParent(const CFX_FloatPoint& point) const {
+CPDF_Point CPWL_Wnd::ChildToParent(const CPDF_Point& point) const {
CFX_Matrix mt = GetChildMatrix();
if (mt.IsIdentity())
return point;
- CFX_FloatPoint pt = point;
+ CPDF_Point pt = point;
mt.Transform(pt.x, pt.y);
return pt;
}
-CFX_FloatRect CPWL_Wnd::ChildToParent(const CFX_FloatRect& rect) const {
+CPDF_Rect CPWL_Wnd::ChildToParent(const CPDF_Rect& rect) const {
CFX_Matrix mt = GetChildMatrix();
if (mt.IsIdentity())
return rect;
- CFX_FloatRect rc = rect;
+ CPDF_Rect rc = rect;
mt.TransformRect(rc);
return rc;
}
-CFX_FloatPoint CPWL_Wnd::ParentToChild(const CFX_FloatPoint& point) const {
+CPDF_Point CPWL_Wnd::ParentToChild(const CPDF_Point& point) const {
CFX_Matrix mt = GetChildMatrix();
if (mt.IsIdentity())
return point;
mt.SetReverse(mt);
- CFX_FloatPoint pt = point;
+ CPDF_Point pt = point;
mt.Transform(pt.x, pt.y);
return pt;
}
-CFX_FloatRect CPWL_Wnd::ParentToChild(const CFX_FloatRect& rect) const {
+CPDF_Rect CPWL_Wnd::ParentToChild(const CPDF_Rect& rect) const {
CFX_Matrix mt = GetChildMatrix();
if (mt.IsIdentity())
return rect;
mt.SetReverse(mt);
- CFX_FloatRect rc = rect;
+ CPDF_Rect rc = rect;
mt.TransformRect(rc);
return rc;
}