summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme')
-rw-r--r--xfa/fwl/theme/cfwl_carettp.cpp12
-rw-r--r--xfa/fwl/theme/cfwl_carettp.h2
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.cpp28
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.h2
-rw-r--r--xfa/fwl/theme/cfwl_comboboxtp.cpp13
-rw-r--r--xfa/fwl/theme/cfwl_edittp.cpp20
-rw-r--r--xfa/fwl/theme/cfwl_listboxtp.cpp8
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.cpp58
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.cpp12
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp24
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp33
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h2
12 files changed, 109 insertions, 105 deletions
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index 37dfad5146..973531958a 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -9,8 +9,8 @@
#include "xfa/fwl/cfwl_caret.h"
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_widget.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
CFWL_CaretTP::CFWL_CaretTP() {}
CFWL_CaretTP::~CFWL_CaretTP() {}
@@ -25,7 +25,7 @@ void CFWL_CaretTP::DrawBackground(CFWL_ThemeBackground* pParams) {
return;
DrawCaretBK(pParams->m_pGraphics, pParams->m_dwStates,
- &(pParams->m_rtPart), (CXFA_Color*)pParams->m_pData,
+ &(pParams->m_rtPart), (CXFA_GEColor*)pParams->m_pData,
&(pParams->m_matrix));
break;
}
@@ -37,15 +37,15 @@ void CFWL_CaretTP::DrawBackground(CFWL_ThemeBackground* pParams) {
void CFWL_CaretTP::DrawCaretBK(CXFA_Graphics* pGraphics,
uint32_t dwStates,
const CFX_RectF* pRect,
- CXFA_Color* crFill,
+ CXFA_GEColor* crFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rect = *pRect;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
if (crFill) {
pGraphics->SetFillColor(*crFill);
} else {
- pGraphics->SetFillColor(CXFA_Color(ArgbEncode(255, 0, 0, 0)));
+ pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 0, 0, 0)));
}
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
diff --git a/xfa/fwl/theme/cfwl_carettp.h b/xfa/fwl/theme/cfwl_carettp.h
index fdf330b8bf..8b88feeda3 100644
--- a/xfa/fwl/theme/cfwl_carettp.h
+++ b/xfa/fwl/theme/cfwl_carettp.h
@@ -21,7 +21,7 @@ class CFWL_CaretTP : public CFWL_WidgetTP {
void DrawCaretBK(CXFA_Graphics* pGraphics,
uint32_t dwStates,
const CFX_RectF* pRect,
- CXFA_Color* crFill,
+ CXFA_GEColor* crFill,
CFX_Matrix* pMatrix = nullptr);
};
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 8d73738aab..82fdc1a18a 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -13,8 +13,8 @@
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_themetext.h"
#include "xfa/fwl/cfwl_widget.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
namespace {
@@ -74,7 +74,7 @@ void CFWL_CheckBoxTP::DrawSignCheck(CXFA_Graphics* pGraphics,
mt.Translate(pRtSign->left, pRtSign->top);
mt.Concat(*pMatrix);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(argbFill));
+ pGraphics->SetFillColor(CXFA_GEColor(argbFill));
pGraphics->FillPath(m_pCheckPath.get(), FXFILL_WINDING, &mt);
pGraphics->RestoreGraphState();
}
@@ -83,10 +83,10 @@ void CFWL_CheckBoxTP::DrawSignCircle(CXFA_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddEllipse(*pRtSign);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(argbFill));
+ pGraphics->SetFillColor(CXFA_GEColor(argbFill));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -95,7 +95,7 @@ void CFWL_CheckBoxTP::DrawSignCross(CXFA_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
float fRight = pRtSign->right();
float fBottom = pRtSign->bottom();
path.AddLine(pRtSign->TopLeft(), CFX_PointF(fRight, fBottom));
@@ -103,7 +103,7 @@ void CFWL_CheckBoxTP::DrawSignCross(CXFA_Graphics* pGraphics,
CFX_PointF(fRight, pRtSign->top));
pGraphics->SaveGraphState();
- pGraphics->SetStrokeColor(CXFA_Color(argbFill));
+ pGraphics->SetStrokeColor(CXFA_GEColor(argbFill));
pGraphics->SetLineWidth(1.0f);
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
@@ -113,7 +113,7 @@ void CFWL_CheckBoxTP::DrawSignDiamond(CXFA_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
float fWidth = pRtSign->width;
float fHeight = pRtSign->height;
float fBottom = pRtSign->bottom();
@@ -124,7 +124,7 @@ void CFWL_CheckBoxTP::DrawSignDiamond(CXFA_Graphics* pGraphics,
path.LineTo(CFX_PointF(pRtSign->left + fWidth / 2, pRtSign->top));
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(argbFill));
+ pGraphics->SetFillColor(CXFA_GEColor(argbFill));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -133,11 +133,11 @@ void CFWL_CheckBoxTP::DrawSignSquare(CXFA_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pRtSign->left, pRtSign->top, pRtSign->width,
pRtSign->height);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(argbFill));
+ pGraphics->SetFillColor(CXFA_GEColor(argbFill));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -146,7 +146,7 @@ void CFWL_CheckBoxTP::DrawSignStar(CXFA_Graphics* pGraphics,
const CFX_RectF* pRtSign,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
float fBottom = pRtSign->bottom();
float fRadius =
(pRtSign->top - fBottom) / (1 + static_cast<float>(cos(FX_PI / 5.0f)));
@@ -172,7 +172,7 @@ void CFWL_CheckBoxTP::DrawSignStar(CXFA_Graphics* pGraphics,
path.LineTo(points[nNext]);
}
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(argbFill));
+ pGraphics->SetFillColor(CXFA_GEColor(argbFill));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -217,7 +217,7 @@ void CFWL_CheckBoxTP::SetThemeData() {
void CFWL_CheckBoxTP::InitCheckPath(float fCheckLen) {
if (!m_pCheckPath) {
- m_pCheckPath = pdfium::MakeUnique<CXFA_Path>();
+ m_pCheckPath = pdfium::MakeUnique<CXFA_GEPath>();
float fWidth = kSignPath;
float fHeight = -kSignPath;
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index 97ef5cf20c..e373b382a8 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -68,7 +68,7 @@ class CFWL_CheckBoxTP : public CFWL_WidgetTP {
void InitCheckPath(float fCheckLen);
std::unique_ptr<CKBThemeData> m_pThemeData;
- std::unique_ptr<CXFA_Path> m_pCheckPath;
+ std::unique_ptr<CXFA_GEPath> m_pCheckPath;
private:
void SetThemeData();
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index 86888c0487..76953423e6 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -10,8 +10,8 @@
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
CFWL_ComboBoxTP::CFWL_ComboBoxTP() {}
@@ -27,7 +27,7 @@ void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
break;
}
case CFWL_Part::Background: {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF& rect = pParams->m_rtPart;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
FX_ARGB argb_color;
@@ -42,7 +42,7 @@ void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
argb_color = 0xFFFFFFFF;
}
pParams->m_pGraphics->SaveGraphState();
- pParams->m_pGraphics->SetFillColor(CXFA_Color(argb_color));
+ pParams->m_pGraphics->SetFillColor(CXFA_GEColor(argb_color));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
pParams->m_pGraphics->RestoreGraphState();
break;
@@ -63,10 +63,11 @@ void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground* pParams,
uint32_t dwStates,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top,
pParams->m_rtPart.width - 1, pParams->m_rtPart.height);
- pParams->m_pGraphics->SetFillColor(CXFA_Color(ArgbEncode(0xff, 0xff, 0, 0)));
+ pParams->m_pGraphics->SetFillColor(
+ CXFA_GEColor(ArgbEncode(0xff, 0xff, 0, 0)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
}
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 9b8497a41e..4f8c4d533e 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -11,8 +11,8 @@
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/cxfa_fwltheme.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
CFWL_EditTP::CFWL_EditTP() {}
@@ -31,7 +31,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
fWidth = edgeData.GetThickness();
}
}
- pParams->m_pGraphics->SetStrokeColor(CXFA_Color(cr));
+ pParams->m_pGraphics->SetStrokeColor(CXFA_GEColor(cr));
pParams->m_pGraphics->SetLineWidth(fWidth);
pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix);
return;
@@ -46,22 +46,22 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (pParams->m_pPath) {
CXFA_Graphics* pGraphics = pParams->m_pGraphics;
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(FWLTHEME_COLOR_BKSelected));
+ pGraphics->SetFillColor(CXFA_GEColor(FWLTHEME_COLOR_BKSelected));
pGraphics->FillPath(pParams->m_pPath, FXFILL_WINDING,
&pParams->m_matrix);
pGraphics->RestoreGraphState();
} else {
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top,
pParams->m_rtPart.width, pParams->m_rtPart.height);
- CXFA_Color cr(FWLTHEME_COLOR_Background);
+ CXFA_GEColor cr(FWLTHEME_COLOR_Background);
if (!pParams->m_bStaticBackground) {
if (pParams->m_dwStates & CFWL_PartState_Disabled)
- cr = CXFA_Color(FWLTHEME_COLOR_EDGERB1);
+ cr = CXFA_GEColor(FWLTHEME_COLOR_EDGERB1);
else if (pParams->m_dwStates & CFWL_PartState_ReadOnly)
- cr = CXFA_Color(ArgbEncode(255, 236, 233, 216));
+ cr = CXFA_GEColor(ArgbEncode(255, 236, 233, 216));
else
- cr = CXFA_Color(0xFFFFFFFF);
+ cr = CXFA_GEColor(0xFFFFFFFF);
}
pParams->m_pGraphics->SaveGraphState();
pParams->m_pGraphics->SetFillColor(cr);
@@ -72,7 +72,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
break;
}
case CFWL_Part::CombTextLine: {
- pParams->m_pGraphics->SetStrokeColor(CXFA_Color(0xFF000000));
+ pParams->m_pGraphics->SetStrokeColor(CXFA_GEColor(0xFF000000));
pParams->m_pGraphics->SetLineWidth(1.0f);
pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix);
break;
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 432be21193..c977b21120 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -9,8 +9,8 @@
#include "xfa/fwl/cfwl_listbox.h"
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_widget.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
CFWL_ListBoxTP::CFWL_ListBoxTP() {}
@@ -66,9 +66,9 @@ void CFWL_ListBoxTP::DrawListBoxItem(CXFA_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
if (dwStates & CFWL_PartState_Selected) {
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(FWLTHEME_COLOR_BKSelected));
+ pGraphics->SetFillColor(CXFA_GEColor(FWLTHEME_COLOR_BKSelected));
CFX_RectF rt(*prtItem);
- CXFA_Path path;
+ CXFA_GEPath path;
#if (_FX_OS_ == _FX_OS_MACOSX_)
path.AddRectangle(rt.left, rt.top, rt.width - 1, rt.height - 1);
#else
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index 975ca013f7..6bb3f186b7 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -12,8 +12,8 @@
#include "xfa/fwl/cfwl_themetext.h"
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
CFWL_MonthCalendarTP::CFWL_MonthCalendarTP() : m_pThemeData(new MCThemeData) {
SetThemeData();
@@ -104,42 +104,42 @@ void CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) {
void CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtTotal(pParams->m_rtPart);
path.AddRectangle(rtTotal.left, rtTotal.top, rtTotal.width, rtTotal.height);
pParams->m_pGraphics->SaveGraphState();
- pParams->m_pGraphics->SetFillColor(CXFA_Color(m_pThemeData->clrBK));
+ pParams->m_pGraphics->SetFillColor(CXFA_GEColor(m_pThemeData->clrBK));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawHeadBk(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtHead = pParams->m_rtPart;
path.AddRectangle(rtHead.left, rtHead.top, rtHead.width, rtHead.height);
pParams->m_pGraphics->SaveGraphState();
- pParams->m_pGraphics->SetFillColor(CXFA_Color(m_pThemeData->clrBK));
+ pParams->m_pGraphics->SetFillColor(CXFA_GEColor(m_pThemeData->clrBK));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtLBtn = pParams->m_rtPart;
path.AddRectangle(rtLBtn.left, rtLBtn.top, rtLBtn.width, rtLBtn.height);
pParams->m_pGraphics->SaveGraphState();
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(ArgbEncode(0xff, 205, 219, 243)));
+ CXFA_GEColor(ArgbEncode(0xff, 205, 219, 243)));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
if (pParams->m_dwStates & CFWL_PartState_Pressed) {
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(ArgbEncode(0xff, 174, 198, 242)));
+ CXFA_GEColor(ArgbEncode(0xff, 174, 198, 242)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
} else {
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(ArgbEncode(0xff, 227, 235, 249)));
+ CXFA_GEColor(ArgbEncode(0xff, 227, 235, 249)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
@@ -152,27 +152,27 @@ void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams,
rtLBtn.bottom() - rtLBtn.height / 4));
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(ArgbEncode(0xff, 50, 104, 205)));
+ CXFA_GEColor(ArgbEncode(0xff, 50, 104, 205)));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtRBtn = pParams->m_rtPart;
path.AddRectangle(rtRBtn.left, rtRBtn.top, rtRBtn.width, rtRBtn.height);
pParams->m_pGraphics->SaveGraphState();
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(ArgbEncode(0xff, 205, 219, 243)));
+ CXFA_GEColor(ArgbEncode(0xff, 205, 219, 243)));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
if (pParams->m_dwStates & CFWL_PartState_Pressed) {
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(ArgbEncode(0xff, 174, 198, 242)));
+ CXFA_GEColor(ArgbEncode(0xff, 174, 198, 242)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
} else {
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(ArgbEncode(0xff, 227, 235, 249)));
+ CXFA_GEColor(ArgbEncode(0xff, 227, 235, 249)));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
@@ -185,31 +185,33 @@ void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams,
rtRBtn.bottom() - rtRBtn.height / 4));
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(ArgbEncode(0xff, 50, 104, 205)));
+ CXFA_GEColor(ArgbEncode(0xff, 50, 104, 205)));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtHSep = pParams->m_rtPart;
path.MoveTo(CFX_PointF(rtHSep.left, rtHSep.top + rtHSep.height / 2));
path.LineTo(CFX_PointF(rtHSep.right(), rtHSep.top + rtHSep.height / 2));
pParams->m_pGraphics->SaveGraphState();
- pParams->m_pGraphics->SetStrokeColor(CXFA_Color(m_pThemeData->clrSeperator));
+ pParams->m_pGraphics->SetStrokeColor(
+ CXFA_GEColor(m_pThemeData->clrSeperator));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtWeekSep = pParams->m_rtPart;
path.MoveTo(rtWeekSep.TopLeft());
path.LineTo(rtWeekSep.BottomLeft());
pParams->m_pGraphics->SaveGraphState();
- pParams->m_pGraphics->SetStrokeColor(CXFA_Color(m_pThemeData->clrSeperator));
+ pParams->m_pGraphics->SetStrokeColor(
+ CXFA_GEColor(m_pThemeData->clrSeperator));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
@@ -218,20 +220,20 @@ void CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
pParams->m_pGraphics->SaveGraphState();
if (pParams->m_dwStates & CFWL_PartState_Selected) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(m_pThemeData->clrDatesSelectedBK));
+ CXFA_GEColor(m_pThemeData->clrDatesSelectedBK));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
} else if (pParams->m_dwStates & CFWL_PartState_Hovered) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams->m_pGraphics->SetFillColor(
- CXFA_Color(m_pThemeData->clrDatesHoverBK));
+ CXFA_GEColor(m_pThemeData->clrDatesHoverBK));
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
pParams->m_pGraphics->RestoreGraphState();
@@ -239,26 +241,26 @@ void CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams,
void CFWL_MonthCalendarTP::DrawDatesInCircle(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams->m_pGraphics->SaveGraphState();
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrDatesCircle));
+ CXFA_GEColor(m_pThemeData->clrDatesCircle));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
void CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rtTodayCircle = pParams->m_rtPart;
path.AddRectangle(rtTodayCircle.left, rtTodayCircle.top, rtTodayCircle.width,
rtTodayCircle.height);
pParams->m_pGraphics->SaveGraphState();
pParams->m_pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrDatesCircle));
+ CXFA_GEColor(m_pThemeData->clrDatesCircle));
pParams->m_pGraphics->StrokePath(&path, pMatrix);
pParams->m_pGraphics->RestoreGraphState();
}
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index c8152f8d9b..3d3b1aabf7 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -10,8 +10,8 @@
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
#define PUSHBUTTON_SIZE_Corner 2
@@ -32,7 +32,7 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
float fRight = rect.right();
float fBottom = rect.bottom();
- CXFA_Path strokePath;
+ CXFA_GEPath strokePath;
strokePath.MoveTo(
CFX_PointF(rect.left + PUSHBUTTON_SIZE_Corner, rect.top));
strokePath.LineTo(CFX_PointF(fRight - PUSHBUTTON_SIZE_Corner, rect.top));
@@ -48,7 +48,7 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
strokePath.LineTo(
CFX_PointF(rect.left + PUSHBUTTON_SIZE_Corner, rect.top));
- CXFA_Path fillPath;
+ CXFA_GEPath fillPath;
fillPath.AddSubpath(&strokePath);
CXFA_Graphics* pGraphics = pParams->m_pGraphics;
@@ -67,14 +67,14 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
m_pThemeData->clrEnd[iColor], &fillPath,
FXFILL_ALTERNATE, &pParams->m_matrix);
- pGraphics->SetStrokeColor(CXFA_Color(m_pThemeData->clrBorder[iColor]));
+ pGraphics->SetStrokeColor(CXFA_GEColor(m_pThemeData->clrBorder[iColor]));
pGraphics->StrokePath(&strokePath, &pParams->m_matrix);
fillPath.Clear();
fillPath.AddRectangle(rtInner.left, rtInner.top, rtInner.width,
rtInner.height);
- pGraphics->SetFillColor(CXFA_Color(m_pThemeData->clrFill[iColor]));
+ pGraphics->SetFillColor(CXFA_GEColor(m_pThemeData->clrFill[iColor]));
pGraphics->FillPath(&fillPath, FXFILL_WINDING, &pParams->m_matrix);
if (pParams->m_dwStates & CFWL_PartState_Focused) {
rtInner.Inflate(1, 1, 0, 0);
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 6b998a9641..d94eed0ebf 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -10,8 +10,8 @@
#include "xfa/fwl/cfwl_themebackground.h"
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
namespace {
@@ -80,7 +80,7 @@ void CFWL_ScrollBarTP::DrawThumbBtn(CXFA_Graphics* pGraphics,
if (eState < FWLTHEME_STATE_Normal || eState > FWLTHEME_STATE_Disable)
return;
- CXFA_Path path;
+ CXFA_GEPath path;
CFX_RectF rect(*pRect);
if (bVert) {
rect.Deflate(1, 0);
@@ -94,7 +94,7 @@ void CFWL_ScrollBarTP::DrawThumbBtn(CXFA_Graphics* pGraphics,
FXFILL_WINDING, pMatrix);
pGraphics->SaveGraphState();
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrBtnBorder[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrBtnBorder[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
} else {
@@ -109,7 +109,7 @@ void CFWL_ScrollBarTP::DrawThumbBtn(CXFA_Graphics* pGraphics,
FXFILL_WINDING, pMatrix);
pGraphics->SaveGraphState();
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrBtnBorder[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrBtnBorder[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -120,7 +120,7 @@ void CFWL_ScrollBarTP::DrawPaw(CXFA_Graphics* pGraphics,
bool bVert,
FWLTHEME_STATE eState,
CFX_Matrix* pMatrix) {
- CXFA_Path path;
+ CXFA_GEPath path;
if (bVert) {
float fPawLen = kPawLength;
if (pRect->width / 2 <= fPawLen) {
@@ -140,7 +140,7 @@ void CFWL_ScrollBarTP::DrawPaw(CXFA_Graphics* pGraphics,
pGraphics->SetLineWidth(1);
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrPawColorLight[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrPawColorLight[eState - 1]));
pGraphics->StrokePath(&path, nullptr);
fX++;
@@ -156,7 +156,7 @@ void CFWL_ScrollBarTP::DrawPaw(CXFA_Graphics* pGraphics,
pGraphics->SetLineWidth(1);
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrPawColorDark[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrPawColorDark[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
} else {
float fPawLen = kPawLength;
@@ -177,7 +177,7 @@ void CFWL_ScrollBarTP::DrawPaw(CXFA_Graphics* pGraphics,
pGraphics->SetLineWidth(1);
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrPawColorLight[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrPawColorLight[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
fY++;
@@ -193,7 +193,7 @@ void CFWL_ScrollBarTP::DrawPaw(CXFA_Graphics* pGraphics,
pGraphics->SetLineWidth(1);
pGraphics->SetStrokeColor(
- CXFA_Color(m_pThemeData->clrPawColorDark[eState - 1]));
+ CXFA_GEColor(m_pThemeData->clrPawColorDark[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
}
}
@@ -208,7 +208,7 @@ void CFWL_ScrollBarTP::DrawTrack(CXFA_Graphics* pGraphics,
return;
pGraphics->SaveGraphState();
- CXFA_Path path;
+ CXFA_GEPath path;
float fRight = pRect->right();
float fBottom = pRect->bottom();
if (bVert) {
@@ -218,7 +218,7 @@ void CFWL_ScrollBarTP::DrawTrack(CXFA_Graphics* pGraphics,
path.AddRectangle(pRect->left, pRect->top, pRect->width, 1);
path.AddRectangle(pRect->left, fBottom - 1, pRect->width, 1);
}
- pGraphics->SetFillColor(CXFA_Color(ArgbEncode(255, 238, 237, 229)));
+ pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 238, 237, 229)));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
path.Clear();
path.AddRectangle(pRect->left + 1, pRect->top, pRect->width - 2,
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index b2c1c9aa74..8a2754b4ad 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -19,9 +19,9 @@
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/cfwl_widgetmgr.h"
#include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fxgraphics/cxfa_color.h"
-#include "xfa/fxgraphics/cxfa_path.h"
-#include "xfa/fxgraphics/cxfa_shading.h"
+#include "xfa/fxgraphics/cxfa_gecolor.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
+#include "xfa/fxgraphics/cxfa_geshading.h"
CFWL_WidgetTP::CFWL_WidgetTP()
: m_dwRefCount(1), m_pFDEFont(nullptr), m_pColorData(nullptr) {}
@@ -102,12 +102,12 @@ void CFWL_WidgetTP::DrawBorder(CXFA_Graphics* pGraphics,
if (!pGraphics || !pRect)
return;
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
path.AddRectangle(pRect->left + 1, pRect->top + 1, pRect->width - 2,
pRect->height - 2);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(ArgbEncode(255, 0, 0, 0)));
+ pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 0, 0, 0)));
pGraphics->FillPath(&path, FXFILL_ALTERNATE, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -125,10 +125,10 @@ void CFWL_WidgetTP::FillSoildRect(CXFA_Graphics* pGraphics,
if (!pGraphics || !pRect)
return;
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(fillColor));
+ pGraphics->SetFillColor(CXFA_GEColor(fillColor));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -140,7 +140,7 @@ void CFWL_WidgetTP::DrawAxialShading(CXFA_Graphics* pGraphics,
float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
- CXFA_Path* path,
+ CXFA_GEPath* path,
int32_t fillMode,
CFX_Matrix* pMatrix) {
if (!pGraphics || !path)
@@ -148,9 +148,10 @@ void CFWL_WidgetTP::DrawAxialShading(CXFA_Graphics* pGraphics,
CFX_PointF begPoint(fx1, fy1);
CFX_PointF endPoint(fx2, fy2);
- CXFA_Shading shading(begPoint, endPoint, false, false, beginColor, endColor);
+ CXFA_GEShading shading(begPoint, endPoint, false, false, beginColor,
+ endColor);
pGraphics->SaveGraphState();
- pGraphics->SetFillColor(CXFA_Color(&shading));
+ pGraphics->SetFillColor(CXFA_GEColor(&shading));
pGraphics->FillPath(path, fillMode, pMatrix);
pGraphics->RestoreGraphState();
}
@@ -162,10 +163,10 @@ void CFWL_WidgetTP::DrawFocus(CXFA_Graphics* pGraphics,
return;
float DashPattern[2] = {1, 1};
- CXFA_Path path;
+ CXFA_GEPath path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
pGraphics->SaveGraphState();
- pGraphics->SetStrokeColor(CXFA_Color(0xFF000000));
+ pGraphics->SetStrokeColor(CXFA_GEColor(0xFF000000));
pGraphics->SetLineDash(0.0f, DashPattern, 2);
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
@@ -182,7 +183,7 @@ void CFWL_WidgetTP::DrawArrow(CXFA_Graphics* pGraphics,
(float)(((pRect->width - (bVert ? 9 : 6)) / 2 + pRect->left) + 0.5);
float fTop =
(float)(((pRect->height - (bVert ? 6 : 9)) / 2 + pRect->top) + 0.5);
- CXFA_Path path;
+ CXFA_GEPath path;
switch (eDict) {
case FWLTHEME_DIRECTION_Down: {
path.MoveTo(CFX_PointF(fLeft, fTop + 1));
@@ -221,7 +222,7 @@ void CFWL_WidgetTP::DrawArrow(CXFA_Graphics* pGraphics,
break;
}
}
- pGraphics->SetFillColor(CXFA_Color(argSign));
+ pGraphics->SetFillColor(CXFA_GEColor(argSign));
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
@@ -231,7 +232,7 @@ void CFWL_WidgetTP::DrawBtn(CXFA_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
InitializeArrowColorData();
- CXFA_Path path;
+ CXFA_GEPath path;
float fRight = pRect->right();
float fBottom = pRect->bottom();
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
@@ -240,7 +241,7 @@ void CFWL_WidgetTP::DrawBtn(CXFA_Graphics* pGraphics,
m_pColorData->clrEnd[eState - 1], &path, FXFILL_WINDING,
pMatrix);
- pGraphics->SetStrokeColor(CXFA_Color(m_pColorData->clrBorder[eState - 1]));
+ pGraphics->SetStrokeColor(CXFA_GEColor(m_pColorData->clrBorder[eState - 1]));
pGraphics->StrokePath(&path, pMatrix);
}
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index a7a217f4a0..5f143fe7d9 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -72,7 +72,7 @@ class CFWL_WidgetTP {
float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
- CXFA_Path* path,
+ CXFA_GEPath* path,
int32_t fillMode = FXFILL_WINDING,
CFX_Matrix* pMatrix = nullptr);
void DrawFocus(CXFA_Graphics* pGraphics,