summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-23 09:25:17 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 14:49:18 +0000
commita0061afa12e0fec210727c9478adb8ac78c5d63c (patch)
tree340b7f1eb44ef89122fa5dc8e952e2a19c39c02f /fpdfsdk/pdfwindow
parentb147e07ee36be10ca0796a6566be107077c21a03 (diff)
downloadpdfium-a0061afa12e0fec210727c9478adb8ac78c5d63c.tar.xz
Convert TransformPoint calls to Transform calls
This Cl converts remaining calls to TransformPoint to use Transform instead. Change-Id: I7a2c000492da5dda3975b4449812f281816fdab6 Reviewed-on: https://pdfium-review.googlesource.com/2822 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp14
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp13
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.h5
4 files changed, 11 insertions, 29 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 4aa3d927d7..f96455e22d 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -266,7 +266,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditBefore.GetLength() > 0)
- sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ sText << "BT\n"
+ << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
<< sEditBefore.AsStringC() << "ET\n";
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelect);
@@ -286,7 +287,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditAfter.GetLength() > 0)
- sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ sText << "BT\n"
+ << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
<< sEditAfter.AsStringC() << "ET\n";
if (sText.GetLength() > 0) {
@@ -394,9 +396,8 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_SystemHandler* pSysHandler = GetSystemHandler();
CFX_Edit::DrawEdit(
pDevice, pUser2Device, m_pEdit.get(),
- CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()),
- CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor(), GetTransparency()),
- rcClip, CFX_PointF(), pRange, pSysHandler, m_pFormFiller);
+ CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), rcClip,
+ CFX_PointF(), pRange, pSysHandler, m_pFormFiller);
}
bool CPWL_Edit::OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) {
@@ -491,7 +492,8 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream(
CFX_ByteTextBuf sRet;
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit.get(), ptOffset);
if (sEdit.GetLength() > 0) {
- sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ sRet << "BT\n"
+ << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
<< sEdit.AsStringC() << "ET\n";
}
return sRet.MakeString();
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index 3f5dfef142..c7e8c9e97c 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -172,7 +172,6 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (pSysHandler && pSysHandler->IsSelectionImplemented()) {
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
CPWL_Utils::PWLColorToFXColor(GetTextColor()),
- CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor()),
rcList, ptOffset, nullptr, pSysHandler,
m_pFormFiller);
pSysHandler->OutputSelectedRect(m_pFormFiller, rcItem);
@@ -180,15 +179,14 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcItem,
ArgbEncode(255, 0, 51, 113));
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
- ArgbEncode(255, 255, 255, 255), 0, rcList, ptOffset,
+ ArgbEncode(255, 255, 255, 255), rcList, ptOffset,
nullptr, pSysHandler, m_pFormFiller);
}
} else {
CFX_SystemHandler* pSysHandler = GetSystemHandler();
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
- CPWL_Utils::PWLColorToFXColor(GetTextColor()),
- CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor()),
- rcList, ptOffset, nullptr, pSysHandler, nullptr);
+ CPWL_Utils::PWLColorToFXColor(GetTextColor()), rcList,
+ ptOffset, nullptr, pSysHandler, nullptr);
}
}
}
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index f5d97adc19..1f13e2ab6c 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -32,7 +32,6 @@ PWL_CREATEPARAM::PWL_CREATEPARAM()
dwBorderWidth(1),
sBorderColor(),
sTextColor(),
- sTextStrokeColor(),
nTransparency(255),
fFontSize(PWL_DEFAULT_FONTSIZE),
sDash(3, 0, 0),
@@ -559,22 +558,10 @@ void CPWL_Wnd::SetBackgroundColor(const CPWL_Color& color) {
m_sPrivateParam.sBackgroundColor = color;
}
-void CPWL_Wnd::SetTextColor(const CPWL_Color& color) {
- m_sPrivateParam.sTextColor = color;
-}
-
-void CPWL_Wnd::SetTextStrokeColor(const CPWL_Color& color) {
- m_sPrivateParam.sTextStrokeColor = color;
-}
-
CPWL_Color CPWL_Wnd::GetTextColor() const {
return m_sPrivateParam.sTextColor;
}
-CPWL_Color CPWL_Wnd::GetTextStrokeColor() const {
- return m_sPrivateParam.sTextStrokeColor;
-}
-
BorderStyle CPWL_Wnd::GetBorderStyle() const {
return m_sPrivateParam.nBorderStyle;
}
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.h b/fpdfsdk/pdfwindow/PWL_Wnd.h
index 92c099f9cd..9c378f06c5 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.h
@@ -181,7 +181,6 @@ struct PWL_CREATEPARAM {
dwBorderWidth = 0;
sBorderColor.Reset();
sTextColor.Reset();
- sTextStrokeColor.Reset();
nTransparency = 0;
fFontSize = 0.0f;
sDash.Reset();
@@ -204,7 +203,6 @@ struct PWL_CREATEPARAM {
int32_t dwBorderWidth; // optional
CPWL_Color sBorderColor; // optional
CPWL_Color sTextColor; // optional
- CPWL_Color sTextStrokeColor; // optional
int32_t nTransparency; // optional
FX_FLOAT fFontSize; // optional
CPWL_Dash sDash; // optional
@@ -286,15 +284,12 @@ class CPWL_Wnd : public CPWL_TimerHandler {
uint32_t msg,
intptr_t wParam = 0,
intptr_t lParam = 0);
- virtual void SetTextColor(const CPWL_Color& color);
- virtual void SetTextStrokeColor(const CPWL_Color& color);
virtual void SetVisible(bool bVisible);
virtual CFX_FloatRect GetFocusRect() const;
virtual CPWL_Color GetBackgroundColor() const;
virtual CPWL_Color GetBorderColor() const;
virtual CPWL_Color GetTextColor() const;
- virtual CPWL_Color GetTextStrokeColor() const;
virtual FX_FLOAT GetFontSize() const;
virtual int32_t GetInnerBorderWidth() const;
virtual CPWL_Color GetBorderLeftTopColor(BorderStyle nBorderStyle) const;