From 281a9eadff15b167e2ee3032e21b83190ad49125 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 26 Feb 2016 14:24:28 -0800 Subject: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1737593006 . --- fpdfsdk/src/fxedit/fxet_ap.cpp | 18 ++--- fpdfsdk/src/fxedit/fxet_edit.cpp | 142 ++++++++++++++++++----------------- fpdfsdk/src/fxedit/fxet_list.cpp | 88 +++++++++++----------- fpdfsdk/src/fxedit/fxet_pageobjs.cpp | 110 +++++++++++++-------------- 4 files changed, 182 insertions(+), 176 deletions(-) (limited to 'fpdfsdk/src/fxedit') diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp index 2803b60d72..562f566edb 100644 --- a/fpdfsdk/src/fxedit/fxet_ap.cpp +++ b/fpdfsdk/src/fxedit/fxet_ap.cpp @@ -60,13 +60,13 @@ static CFX_ByteString GetFontSetString(IFX_Edit_FontMap* pFontMap, CFX_ByteString IFX_Edit::GetEditAppearanceStream( IFX_Edit* pEdit, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange /* = NULL*/, FX_BOOL bContinuous /* = TRUE*/, FX_WORD SubWord /* = 0*/) { CFX_ByteTextBuf sEditStream, sWords; - CPDF_Point ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); + CFX_FloatPoint ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); int32_t nCurFontIndex = -1; if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) { @@ -92,13 +92,13 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CFX_FloatPoint(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y); } else { CPVT_Line line; pIterator->GetLine(line); - ptNew = CPDF_Point(line.ptLine.x + ptOffset.x, - line.ptLine.y + ptOffset.y); + ptNew = CFX_FloatPoint(line.ptLine.x + ptOffset.x, + line.ptLine.y + ptOffset.y); } if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) { @@ -129,8 +129,8 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( } else { CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CFX_FloatPoint(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y); if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) { sEditStream << ptNew.x - ptOld.x << " " << ptNew.y - ptOld.y @@ -176,7 +176,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( CFX_ByteString IFX_Edit::GetSelectAppearanceStream( IFX_Edit* pEdit, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange) { CFX_ByteTextBuf sRet; diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp index 0e66b0e3b5..1b68dc0510 100644 --- a/fpdfsdk/src/fxedit/fxet_edit.cpp +++ b/fpdfsdk/src/fxedit/fxet_edit.cpp @@ -155,7 +155,7 @@ void CFX_Edit_Refresh::BeginRefresh() { } void CFX_Edit_Refresh::Push(const CPVT_WordRange& linerange, - const CPDF_Rect& rect) { + const CFX_FloatRect& rect) { m_NewLineRects.Add(linerange, rect); } @@ -175,7 +175,7 @@ void CFX_Edit_Refresh::NoAnalyse() { void CFX_Edit_Refresh::Analyse(int32_t nAlignment) { FX_BOOL bLineTopChanged = FALSE; - CPDF_Rect rcResult; + CFX_FloatRect rcResult; FX_FLOAT fWidthDiff; int32_t szMax = std::max(m_OldLineRects.GetSize(), m_NewLineRects.GetSize()); @@ -240,7 +240,7 @@ void CFX_Edit_Refresh::Analyse(int32_t nAlignment) { } } -void CFX_Edit_Refresh::AddRefresh(const CPDF_Rect& rect) { +void CFX_Edit_Refresh::AddRefresh(const CFX_FloatRect& rect) { m_RefreshRects.Add(rect); } @@ -814,9 +814,9 @@ IFX_Edit_FontMap* CFX_Edit::GetFontMap() { return NULL; } -void CFX_Edit::SetPlateRect(const CPDF_Rect& rect, FX_BOOL bPaint) { +void CFX_Edit::SetPlateRect(const CFX_FloatRect& rect, FX_BOOL bPaint) { m_pVT->SetPlateRect(rect); - m_ptScrollPos = CPDF_Point(rect.left, rect.top); + m_ptScrollPos = CFX_FloatPoint(rect.left, rect.top); if (bPaint) Paint(); } @@ -1631,11 +1631,11 @@ int32_t CFX_Edit::GetCharArray() const { return m_pVT->GetCharArray(); } -CPDF_Rect CFX_Edit::GetPlateRect() const { +CFX_FloatRect CFX_Edit::GetPlateRect() const { return m_pVT->GetPlateRect(); } -CPDF_Rect CFX_Edit::GetContentRect() const { +CFX_FloatRect CFX_Edit::GetContentRect() const { return VTToEdit(m_pVT->GetContentRect()); } @@ -1659,12 +1659,12 @@ CPVT_WordRange CFX_Edit::GetVisibleWordRange() const { return GetWholeWordRange(); if (m_pVT->IsValid()) { - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); - CPVT_WordPlace place1 = - m_pVT->SearchWordPlace(EditToVT(CPDF_Point(rcPlate.left, rcPlate.top))); + CPVT_WordPlace place1 = m_pVT->SearchWordPlace( + EditToVT(CFX_FloatPoint(rcPlate.left, rcPlate.top))); CPVT_WordPlace place2 = m_pVT->SearchWordPlace( - EditToVT(CPDF_Point(rcPlate.right, rcPlate.bottom))); + EditToVT(CFX_FloatPoint(rcPlate.right, rcPlate.bottom))); return CPVT_WordRange(place1, place2); } @@ -1672,7 +1672,7 @@ CPVT_WordRange CFX_Edit::GetVisibleWordRange() const { return CPVT_WordRange(); } -CPVT_WordPlace CFX_Edit::SearchWordPlace(const CPDF_Point& point) const { +CPVT_WordPlace CFX_Edit::SearchWordPlace(const CFX_FloatPoint& point) const { if (m_pVT->IsValid()) { return m_pVT->SearchWordPlace(EditToVT(point)); } @@ -1712,7 +1712,7 @@ void CFX_Edit::RearrangePart(const CPVT_WordRange& range) { void CFX_Edit::SetContentChanged() { if (m_bNotify && m_pNotify) { - CPDF_Rect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcContent = m_pVT->GetContentRect(); if (rcContent.Width() != m_rcOldContent.Width() || rcContent.Height() != m_rcOldContent.Height()) { if (!m_bNotifyFlag) { @@ -1751,9 +1751,9 @@ FX_BOOL CFX_Edit::IsSelected() const { return m_SelState.IsExist(); } -CPDF_Point CFX_Edit::VTToEdit(const CPDF_Point& point) const { - CPDF_Rect rcContent = m_pVT->GetContentRect(); - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); +CFX_FloatPoint CFX_Edit::VTToEdit(const CFX_FloatPoint& point) const { + CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); FX_FLOAT fPadding = 0.0f; @@ -1769,13 +1769,13 @@ CPDF_Point CFX_Edit::VTToEdit(const CPDF_Point& point) const { break; } - return CPDF_Point(point.x - (m_ptScrollPos.x - rcPlate.left), - point.y - (m_ptScrollPos.y + fPadding - rcPlate.top)); + return CFX_FloatPoint(point.x - (m_ptScrollPos.x - rcPlate.left), + point.y - (m_ptScrollPos.y + fPadding - rcPlate.top)); } -CPDF_Point CFX_Edit::EditToVT(const CPDF_Point& point) const { - CPDF_Rect rcContent = m_pVT->GetContentRect(); - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); +CFX_FloatPoint CFX_Edit::EditToVT(const CFX_FloatPoint& point) const { + CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); FX_FLOAT fPadding = 0.0f; @@ -1791,28 +1791,32 @@ CPDF_Point CFX_Edit::EditToVT(const CPDF_Point& point) const { break; } - return CPDF_Point(point.x + (m_ptScrollPos.x - rcPlate.left), - point.y + (m_ptScrollPos.y + fPadding - rcPlate.top)); + return CFX_FloatPoint(point.x + (m_ptScrollPos.x - rcPlate.left), + point.y + (m_ptScrollPos.y + fPadding - rcPlate.top)); } -CPDF_Rect CFX_Edit::VTToEdit(const CPDF_Rect& rect) const { - CPDF_Point ptLeftBottom = VTToEdit(CPDF_Point(rect.left, rect.bottom)); - CPDF_Point ptRightTop = VTToEdit(CPDF_Point(rect.right, rect.top)); +CFX_FloatRect CFX_Edit::VTToEdit(const CFX_FloatRect& rect) const { + CFX_FloatPoint ptLeftBottom = + VTToEdit(CFX_FloatPoint(rect.left, rect.bottom)); + CFX_FloatPoint ptRightTop = VTToEdit(CFX_FloatPoint(rect.right, rect.top)); - return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); + return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, + ptRightTop.y); } -CPDF_Rect CFX_Edit::EditToVT(const CPDF_Rect& rect) const { - CPDF_Point ptLeftBottom = EditToVT(CPDF_Point(rect.left, rect.bottom)); - CPDF_Point ptRightTop = EditToVT(CPDF_Point(rect.right, rect.top)); +CFX_FloatRect CFX_Edit::EditToVT(const CFX_FloatRect& rect) const { + CFX_FloatPoint ptLeftBottom = + EditToVT(CFX_FloatPoint(rect.left, rect.bottom)); + CFX_FloatPoint ptRightTop = EditToVT(CFX_FloatPoint(rect.right, rect.top)); - return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); + return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, + ptRightTop.y); } void CFX_Edit::SetScrollInfo() { if (m_bNotify && m_pNotify) { - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); - CPDF_Rect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); + CFX_FloatRect rcContent = m_pVT->GetContentRect(); if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; @@ -1868,21 +1872,21 @@ void CFX_Edit::SetScrollPosY(FX_FLOAT fy) { } } -void CFX_Edit::SetScrollPos(const CPDF_Point& point) { +void CFX_Edit::SetScrollPos(const CFX_FloatPoint& point) { SetScrollPosX(point.x); SetScrollPosY(point.y); SetScrollLimit(); SetCaretInfo(); } -CPDF_Point CFX_Edit::GetScrollPos() const { +CFX_FloatPoint CFX_Edit::GetScrollPos() const { return m_ptScrollPos; } void CFX_Edit::SetScrollLimit() { if (m_pVT->IsValid()) { - CPDF_Rect rcContent = m_pVT->GetContentRect(); - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); + CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); if (rcPlate.Width() > rcContent.Width()) { SetScrollPosX(rcPlate.left); @@ -1912,8 +1916,8 @@ void CFX_Edit::ScrollToCaret() { SetScrollLimit(); if (m_pVT->IsValid()) { - CPDF_Point ptHead(0, 0); - CPDF_Point ptFoot(0, 0); + CFX_FloatPoint ptHead(0, 0); + CFX_FloatPoint ptFoot(0, 0); if (IPDF_VariableText_Iterator* pIterator = m_pVT->GetIterator()) { pIterator->SetAt(m_wpCaret); @@ -1933,10 +1937,10 @@ void CFX_Edit::ScrollToCaret() { } } - CPDF_Point ptHeadEdit = VTToEdit(ptHead); - CPDF_Point ptFootEdit = VTToEdit(ptFoot); + CFX_FloatPoint ptHeadEdit = VTToEdit(ptHead); + CFX_FloatPoint ptFootEdit = VTToEdit(ptFoot); - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); if (!FX_EDIT_IsFloatEqual(rcPlate.left, rcPlate.right)) { if (FX_EDIT_IsFloatSmaller(ptHeadEdit.x, rcPlate.left) || @@ -2003,10 +2007,10 @@ void CFX_Edit::RefreshPushLineRects(const CPVT_WordRange& wr) { if (lineinfo.lineplace.LineCmp(wpEnd) > 0) break; - CPDF_Rect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CFX_FloatRect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.Push(CPVT_WordRange(lineinfo.lineplace, lineinfo.lineEnd), VTToEdit(rcLine)); @@ -2038,17 +2042,17 @@ void CFX_Edit::RefreshPushRandomRects(const CPVT_WordRange& wr) { if (place.LineCmp(wrTemp.BeginPos) == 0 || place.LineCmp(wrTemp.EndPos) == 0) { - CPDF_Rect rcWord(wordinfo.ptWord.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - wordinfo.ptWord.x + wordinfo.fWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CFX_FloatRect rcWord(wordinfo.ptWord.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + wordinfo.ptWord.x + wordinfo.fWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.AddRefresh(VTToEdit(rcWord)); } else { - CPDF_Rect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CFX_FloatRect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.AddRefresh(VTToEdit(rcLine)); @@ -2081,29 +2085,29 @@ void CFX_Edit::RefreshWordRange(const CPVT_WordRange& wr) { if (place.LineCmp(wrTemp.BeginPos) == 0 || place.LineCmp(wrTemp.EndPos) == 0) { - CPDF_Rect rcWord(wordinfo.ptWord.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - wordinfo.ptWord.x + wordinfo.fWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CFX_FloatRect rcWord(wordinfo.ptWord.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + wordinfo.ptWord.x + wordinfo.fWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CPDF_Rect rcRefresh = VTToEdit(rcWord); + CFX_FloatRect rcRefresh = VTToEdit(rcWord); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } } } else { - CPDF_Rect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CFX_FloatRect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CPDF_Rect rcRefresh = VTToEdit(rcLine); + CFX_FloatRect rcRefresh = VTToEdit(rcLine); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } @@ -2123,7 +2127,7 @@ void CFX_Edit::SetCaret(const CPVT_WordPlace& place) { void CFX_Edit::SetCaretInfo() { if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { - CPDF_Point ptHead(0.0f, 0.0f), ptFoot(0.0f, 0.0f); + CFX_FloatPoint ptHead(0.0f, 0.0f), ptFoot(0.0f, 0.0f); if (IPDF_VariableText_Iterator* pIterator = m_pVT->GetIterator()) { pIterator->SetAt(m_wpCaret); @@ -2195,7 +2199,7 @@ void CFX_Edit::SetCaret(int32_t nPos) { } } -void CFX_Edit::OnMouseDown(const CPDF_Point& point, +void CFX_Edit::OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) { if (m_pVT->IsValid()) { @@ -2209,7 +2213,7 @@ void CFX_Edit::OnMouseDown(const CPDF_Point& point, } } -void CFX_Edit::OnMouseMove(const CPDF_Point& point, +void CFX_Edit::OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) { if (m_pVT->IsValid()) { @@ -2853,8 +2857,8 @@ FX_BOOL CFX_Edit::IsTextFull() const { FX_BOOL CFX_Edit::IsTextOverflow() const { if (!m_bEnableScroll && !m_bEnableOverflow) { - CPDF_Rect rcPlate = m_pVT->GetPlateRect(); - CPDF_Rect rcContent = m_pVT->GetContentRect(); + CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); + CFX_FloatRect rcContent = m_pVT->GetContentRect(); if (m_pVT->IsMultiLine() && GetTotalLines() > 1) { if (FX_EDIT_IsFloatBigger(rcContent.Height(), rcPlate.Height())) diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp index 4e8ae0cb8e..313cc481b3 100644 --- a/fpdfsdk/src/fxedit/fxet_list.cpp +++ b/fpdfsdk/src/fxedit/fxet_list.cpp @@ -155,11 +155,11 @@ int32_t CFX_List::GetCount() const { return m_aListItems.GetSize(); } -CPDF_Rect CFX_List::GetPlateRect() const { +CFX_FloatRect CFX_List::GetPlateRect() const { return CFX_ListContainer::GetPlateRect(); } -CPDF_Rect CFX_List::GetContentRect() const { +CFX_FloatRect CFX_List::GetContentRect() const { return InnerToOuter(CFX_ListContainer::GetContentRect()); } @@ -167,8 +167,8 @@ FX_FLOAT CFX_List::GetFontSize() const { return m_fFontSize; } -int32_t CFX_List::GetItemIndex(const CPDF_Point& point) const { - CPDF_Point pt = OuterToInner(point); +int32_t CFX_List::GetItemIndex(const CFX_FloatPoint& point) const { + CFX_FloatPoint pt = OuterToInner(point); FX_BOOL bFirst = TRUE; FX_BOOL bLast = TRUE; @@ -250,15 +250,15 @@ int32_t CFX_List::FindNext(int32_t nIndex, FX_WCHAR nChar) const { return nCircleIndex; } -CPDF_Rect CFX_List::GetItemRect(int32_t nIndex) const { +CFX_FloatRect CFX_List::GetItemRect(int32_t nIndex) const { if (CFX_ListItem* pListItem = m_aListItems.GetAt(nIndex)) { - CPDF_Rect rcItem = pListItem->GetRect(); + CFX_FloatRect rcItem = pListItem->GetRect(); rcItem.left = 0.0f; rcItem.right = GetPlateRect().Width(); return InnerToOuter(rcItem); } - return CPDF_Rect(); + return CFX_FloatRect(); } FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const { @@ -423,35 +423,37 @@ void CFX_ListCtrl::SetNotify(IFX_List_Notify* pNotify) { m_pNotify = pNotify; } -CPDF_Point CFX_ListCtrl::InToOut(const CPDF_Point& point) const { - CPDF_Rect rcPlate = GetPlateRect(); +CFX_FloatPoint CFX_ListCtrl::InToOut(const CFX_FloatPoint& point) const { + CFX_FloatRect rcPlate = GetPlateRect(); - return CPDF_Point(point.x - (m_ptScrollPos.x - rcPlate.left), - point.y - (m_ptScrollPos.y - rcPlate.top)); + return CFX_FloatPoint(point.x - (m_ptScrollPos.x - rcPlate.left), + point.y - (m_ptScrollPos.y - rcPlate.top)); } -CPDF_Point CFX_ListCtrl::OutToIn(const CPDF_Point& point) const { - CPDF_Rect rcPlate = GetPlateRect(); +CFX_FloatPoint CFX_ListCtrl::OutToIn(const CFX_FloatPoint& point) const { + CFX_FloatRect rcPlate = GetPlateRect(); - return CPDF_Point(point.x + (m_ptScrollPos.x - rcPlate.left), - point.y + (m_ptScrollPos.y - rcPlate.top)); + return CFX_FloatPoint(point.x + (m_ptScrollPos.x - rcPlate.left), + point.y + (m_ptScrollPos.y - rcPlate.top)); } -CPDF_Rect CFX_ListCtrl::InToOut(const CPDF_Rect& rect) const { - CPDF_Point ptLeftBottom = InToOut(CPDF_Point(rect.left, rect.bottom)); - CPDF_Point ptRightTop = InToOut(CPDF_Point(rect.right, rect.top)); +CFX_FloatRect CFX_ListCtrl::InToOut(const CFX_FloatRect& rect) const { + CFX_FloatPoint ptLeftBottom = InToOut(CFX_FloatPoint(rect.left, rect.bottom)); + CFX_FloatPoint ptRightTop = InToOut(CFX_FloatPoint(rect.right, rect.top)); - return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); + return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, + ptRightTop.y); } -CPDF_Rect CFX_ListCtrl::OutToIn(const CPDF_Rect& rect) const { - CPDF_Point ptLeftBottom = OutToIn(CPDF_Point(rect.left, rect.bottom)); - CPDF_Point ptRightTop = OutToIn(CPDF_Point(rect.right, rect.top)); +CFX_FloatRect CFX_ListCtrl::OutToIn(const CFX_FloatRect& rect) const { + CFX_FloatPoint ptLeftBottom = OutToIn(CFX_FloatPoint(rect.left, rect.bottom)); + CFX_FloatPoint ptRightTop = OutToIn(CFX_FloatPoint(rect.right, rect.top)); - return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); + return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, + ptRightTop.y); } -void CFX_ListCtrl::OnMouseDown(const CPDF_Point& point, +void CFX_ListCtrl::OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) { int32_t nHitIndex = GetItemIndex(point); @@ -490,7 +492,7 @@ void CFX_ListCtrl::OnMouseDown(const CPDF_Point& point, ScrollToListItem(nHitIndex); } -void CFX_ListCtrl::OnMouseMove(const CPDF_Point& point, +void CFX_ListCtrl::OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) { int32_t nHitIndex = GetItemIndex(point); @@ -578,15 +580,15 @@ FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) { return FALSE; } -void CFX_ListCtrl::SetPlateRect(const CPDF_Rect& rect) { +void CFX_ListCtrl::SetPlateRect(const CFX_FloatRect& rect) { CFX_ListContainer::SetPlateRect(rect); m_ptScrollPos.x = rect.left; - SetScrollPos(CPDF_Point(rect.left, rect.top)); + SetScrollPos(CFX_FloatPoint(rect.left, rect.top)); ReArrange(0); InvalidateItem(-1); } -CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const { +CFX_FloatRect CFX_ListCtrl::GetItemRect(int32_t nIndex) const { return InToOut(CFX_List::GetItemRect(nIndex)); } @@ -650,14 +652,14 @@ void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex) { if (nItemIndex == -1) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CPDF_Rect rcRefresh = GetPlateRect(); + CFX_FloatRect rcRefresh = GetPlateRect(); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } } else { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CPDF_Rect rcRefresh = GetItemRect(nItemIndex); + CFX_FloatRect rcRefresh = GetItemRect(nItemIndex); rcRefresh.left -= 1.0f; rcRefresh.right += 1.0f; rcRefresh.bottom -= 1.0f; @@ -701,8 +703,8 @@ void CFX_ListCtrl::Select(int32_t nItemIndex) { } FX_BOOL CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const { - CPDF_Rect rcPlate = GetPlateRect(); - CPDF_Rect rcItem = GetItemRect(nItemIndex); + CFX_FloatRect rcPlate = GetPlateRect(); + CFX_FloatRect rcItem = GetItemRect(nItemIndex); return rcItem.bottom >= rcPlate.bottom && rcItem.top <= rcPlate.top; } @@ -711,9 +713,9 @@ void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex) { if (!IsValid(nItemIndex)) return; - CPDF_Rect rcPlate = GetPlateRect(); - CPDF_Rect rcItem = CFX_List::GetItemRect(nItemIndex); - CPDF_Rect rcItemCtrl = GetItemRect(nItemIndex); + CFX_FloatRect rcPlate = GetPlateRect(); + CFX_FloatRect rcItem = CFX_List::GetItemRect(nItemIndex); + CFX_FloatRect rcItemCtrl = GetItemRect(nItemIndex); if (FX_EDIT_IsFloatSmaller(rcItemCtrl.bottom, rcPlate.bottom)) { if (FX_EDIT_IsFloatSmaller(rcItemCtrl.top, rcPlate.top)) { @@ -728,8 +730,8 @@ void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex) { void CFX_ListCtrl::SetScrollInfo() { if (m_pNotify) { - CPDF_Rect rcPlate = GetPlateRect(); - CPDF_Rect rcContent = CFX_List::GetContentRect(); + CFX_FloatRect rcPlate = GetPlateRect(); + CFX_FloatRect rcContent = CFX_List::GetContentRect(); if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; @@ -741,14 +743,14 @@ void CFX_ListCtrl::SetScrollInfo() { } } -void CFX_ListCtrl::SetScrollPos(const CPDF_Point& point) { +void CFX_ListCtrl::SetScrollPos(const CFX_FloatPoint& point) { SetScrollPosY(point.y); } void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy) { if (!FX_EDIT_IsFloatEqual(m_ptScrollPos.y, fy)) { - CPDF_Rect rcPlate = GetPlateRect(); - CPDF_Rect rcContent = CFX_List::GetContentRect(); + CFX_FloatRect rcPlate = GetPlateRect(); + CFX_FloatRect rcContent = CFX_List::GetContentRect(); if (rcPlate.Height() > rcContent.Height()) { fy = rcPlate.top; @@ -773,7 +775,7 @@ void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy) { } } -CPDF_Rect CFX_ListCtrl::GetContentRect() const { +CFX_FloatRect CFX_ListCtrl::GetContentRect() const { return InToOut(CFX_List::GetContentRect()); } @@ -785,7 +787,7 @@ void CFX_ListCtrl::ReArrange(int32_t nItemIndex) { void CFX_ListCtrl::SetTopItem(int32_t nIndex) { if (IsValid(nIndex)) { GetPlateRect(); - CPDF_Rect rcItem = CFX_List::GetItemRect(nIndex); + CFX_FloatRect rcItem = CFX_List::GetItemRect(nIndex); SetScrollPosY(rcItem.top); } } @@ -808,7 +810,7 @@ void CFX_ListCtrl::Cancel() { m_aSelItems.DeselectAll(); } -int32_t CFX_ListCtrl::GetItemIndex(const CPDF_Point& point) const { +int32_t CFX_ListCtrl::GetItemIndex(const CFX_FloatPoint& point) const { return CFX_List::GetItemIndex(OutToIn(point)); } diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp index ed96b96654..752e537099 100644 --- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp +++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp @@ -13,22 +13,22 @@ #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f -CPDF_Rect GetUnderLineRect(const CPVT_Word& word) { - return CPDF_Rect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, - word.ptWord.x + word.fWidth, - word.ptWord.y + word.fDescent * 0.25f); +CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) { + return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, + word.ptWord.x + word.fWidth, + word.ptWord.y + word.fDescent * 0.25f); } -CPDF_Rect GetCrossoutRect(const CPVT_Word& word) { - return CPDF_Rect(word.ptWord.x, - word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + - word.fDescent * 0.25f, - word.ptWord.x + word.fWidth, - word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f); +CFX_FloatRect GetCrossoutRect(const CPVT_Word& word) { + return CFX_FloatRect(word.ptWord.x, + word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + + word.fDescent * 0.25f, + word.ptWord.x + word.fWidth, + word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f); } static void DrawTextString(CFX_RenderDevice* pDevice, - const CPDF_Point& pt, + const CFX_FloatPoint& pt, CPDF_Font* pFont, FX_FLOAT fFontSize, CFX_Matrix* pUser2Device, @@ -49,7 +49,7 @@ static void DrawTextString(CFX_RenderDevice* pDevice, ro.m_ColorMode = RENDER_COLOR_NORMAL; if (crTextStroke != 0) { - CPDF_Point pt1(0, 0), pt2(1, 0); + CFX_FloatPoint pt1(0, 0), pt2(1, 0); pUser2Device->Transform(pt1.x, pt1.y); pUser2Device->Transform(pt2.x, pt2.y); CFX_GraphStateData gsd; @@ -69,7 +69,7 @@ static void DrawTextString(CFX_RenderDevice* pDevice, ro.m_ColorMode = RENDER_COLOR_NORMAL; if (crTextStroke != 0) { - CPDF_Point pt1(0, 0), pt2(1, 0); + CFX_FloatPoint pt1(0, 0), pt2(1, 0); pUser2Device->Transform(pt1.x, pt1.y); pUser2Device->Transform(pt2.x, pt2.y); CFX_GraphStateData gsd; @@ -92,13 +92,13 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, IFX_Edit* pEdit, FX_COLORREF color, - const CPDF_Rect& rcClip, - const CPDF_Point& ptOffset, + const CFX_FloatRect& rcClip, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange) { pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CPDF_Rect rcTemp = rcClip; + CFX_FloatRect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -123,7 +123,7 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CPVT_Word word; if (pIterator->GetWord(word)) { CFX_PathData pathUnderline; - CPDF_Rect rcUnderline = GetUnderLineRect(word); + CFX_FloatRect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; @@ -146,8 +146,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, IFX_Edit* pEdit, FX_COLORREF crTextFill, FX_COLORREF crTextStroke, - const CPDF_Rect& rcClip, - const CPDF_Point& ptOffset, + const CFX_FloatRect& rcClip, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData) { @@ -169,12 +169,12 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CFX_ByteTextBuf sTextBuf; int32_t nFontIndex = -1; - CPDF_Point ptBT(0.0f, 0.0f); + CFX_FloatPoint ptBT(0.0f, 0.0f); pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CPDF_Rect rcTemp = rcClip; + CFX_FloatRect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -218,9 +218,9 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, pIterator->GetLine(line); if (pSystemHandler && pSystemHandler->IsSelectionImplemented()) { - CPDF_Rect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent, - word.ptWord.x + word.fWidth, - line.ptLine.y + line.fLineAscent); + CFX_FloatRect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent, + word.ptWord.x + word.fWidth, + line.ptLine.y + line.fLineAscent); rc.Intersect(rcClip); pSystemHandler->OutputSelectedRect(pFFLData, rc); } else { @@ -239,8 +239,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, if (place.LineCmp(oldplace) != 0 || word.nFontIndex != nFontIndex || crOldFill != crCurFill) { if (sTextBuf.GetLength() > 0) { - DrawTextString(pDevice, CPDF_Point(ptBT.x + ptOffset.x, - ptBT.y + ptOffset.y), + DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, + ptBT.y + ptOffset.y), pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale); @@ -256,8 +256,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, SubWord); } else { DrawTextString( - pDevice, CPDF_Point(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y), + pDevice, CFX_FloatPoint(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y), pFontMap->GetPDFFont(word.nFontIndex), fFontSize, pUser2Device, GetPDFWordString(pFontMap, word.nFontIndex, word.Word, SubWord), crCurFill, crTextStroke, nHorzScale); @@ -268,7 +268,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, if (sTextBuf.GetLength() > 0) { DrawTextString( - pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale); } @@ -281,8 +281,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, IFX_Edit* pEdit, - const CPDF_Rect& rcClip, - const CPDF_Point& ptOffset, + const CFX_FloatRect& rcClip, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange) { CPVT_WordRange wrSelect = pEdit->GetSelectWordRange(); @@ -294,12 +294,12 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CFX_ByteTextBuf sTextBuf; CPVT_WordProps wp; - CPDF_Point ptBT(0.0f, 0.0f); + CFX_FloatPoint ptBT(0.0f, 0.0f); pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CPDF_Rect rcTemp = rcClip; + CFX_FloatRect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -357,11 +357,11 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, FXSYS_memcmp(&word.WordProps, &wp, sizeof(CPVT_WordProps)) != 0 || crOld != crCurText) { if (sTextBuf.GetLength() > 0) { - DrawTextString( - pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), - pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, - pUser2Device, sTextBuf.GetByteString(), crOld, 0, - wp.nHorzScale); + DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, + ptBT.y + ptOffset.y), + pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, + pUser2Device, sTextBuf.GetByteString(), crOld, 0, + wp.nHorzScale); sTextBuf.Clear(); } @@ -375,7 +375,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) { CFX_PathData pathUnderline; - CPDF_Rect rcUnderline = GetUnderLineRect(word); + CFX_FloatRect rcUnderline = GetUnderLineRect(word); pathUnderline.AppendRect(rcUnderline.left, rcUnderline.bottom, rcUnderline.right, rcUnderline.top); @@ -385,7 +385,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (word.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) { CFX_PathData pathCrossout; - CPDF_Rect rcCrossout = GetCrossoutRect(word); + CFX_FloatRect rcCrossout = GetCrossoutRect(word); pathCrossout.AppendRect(rcCrossout.left, rcCrossout.bottom, rcCrossout.right, rcCrossout.top); @@ -399,7 +399,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (sTextBuf.GetLength() > 0) { DrawTextString( - pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, pUser2Device, sTextBuf.GetByteString(), crOld, 0, wp.nHorzScale); } @@ -411,7 +411,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, static void AddRectToPageObjects(CPDF_PageObjectHolder* pObjectHolder, FX_COLORREF crFill, - const CPDF_Rect& rcFill) { + const CFX_FloatRect& rcFill) { std::unique_ptr pPathObj(new CPDF_PathObject); CFX_PathData* pPathData = pPathObj->m_Path.GetModify(); pPathData->AppendRect(rcFill.left, rcFill.bottom, rcFill.right, rcFill.top); @@ -435,7 +435,7 @@ static CPDF_TextObject* AddTextObjToPageObjects( FX_FLOAT fFontSize, FX_FLOAT fCharSpace, int32_t nHorzScale, - const CPDF_Point& point, + const CFX_FloatPoint& point, const CFX_ByteString& text) { std::unique_ptr pTxtObj(new CPDF_TextObject); CPDF_TextStateData* pTextStateData = pTxtObj->m_TextState.GetModify(); @@ -469,7 +469,7 @@ static CPDF_TextObject* AddTextObjToPageObjects( void IFX_Edit::GeneratePageObjects( CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF crText, CFX_ArrayTemplate& ObjArray) { @@ -478,7 +478,7 @@ void IFX_Edit::GeneratePageObjects( int32_t nOldFontIndex = -1; CFX_ByteTextBuf sTextBuf; - CPDF_Point ptBT(0.0f, 0.0f); + CFX_FloatPoint ptBT(0.0f, 0.0f); ObjArray.RemoveAll(); @@ -504,7 +504,7 @@ void IFX_Edit::GeneratePageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100, - CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); sTextBuf.Clear(); @@ -523,7 +523,7 @@ void IFX_Edit::GeneratePageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100, - CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); } } @@ -533,7 +533,7 @@ void IFX_Edit::GeneratePageObjects( void IFX_Edit::GenerateRichPageObjects( CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange, CFX_ArrayTemplate& ObjArray) { FX_COLORREF crCurText = ArgbEncode(255, 0, 0, 0); @@ -541,7 +541,7 @@ void IFX_Edit::GenerateRichPageObjects( CFX_ByteTextBuf sTextBuf; CPVT_WordProps wp; - CPDF_Point ptBT(0.0f, 0.0f); + CFX_FloatPoint ptBT(0.0f, 0.0f); ObjArray.RemoveAll(); @@ -574,7 +574,7 @@ void IFX_Edit::GenerateRichPageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, - CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); sTextBuf.Clear(); @@ -589,7 +589,7 @@ void IFX_Edit::GenerateRichPageObjects( word.Word, 0); if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) { - CPDF_Rect rcUnderline = GetUnderLineRect(word); + CFX_FloatRect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; @@ -599,7 +599,7 @@ void IFX_Edit::GenerateRichPageObjects( } if (word.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) { - CPDF_Rect rcCrossout = GetCrossoutRect(word); + CFX_FloatRect rcCrossout = GetCrossoutRect(word); rcCrossout.left += ptOffset.x; rcCrossout.right += ptOffset.x; rcCrossout.top += ptOffset.y; @@ -616,7 +616,7 @@ void IFX_Edit::GenerateRichPageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, - CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); } } @@ -625,7 +625,7 @@ void IFX_Edit::GenerateRichPageObjects( void IFX_Edit::GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF color) { if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) { @@ -644,7 +644,7 @@ void IFX_Edit::GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder, CPVT_Word word; if (pIterator->GetWord(word)) { - CPDF_Rect rcUnderline = GetUnderLineRect(word); + CFX_FloatRect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; -- cgit v1.2.3