summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-13 13:51:04 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 18:33:44 +0000
commitfe75997a8a8d7fc555d91c3aad595112a46ad7a2 (patch)
treed58bf413c2261ccd96820004dbaba71bd3ad2022 /xfa/fxfa
parent334e79e15c271aeccacd65376e0050725d79d79d (diff)
downloadpdfium-fe75997a8a8d7fc555d91c3aad595112a46ad7a2.tar.xz
Rename cfx_color to cxfa_color
This CL renames CFX_Color to CXFA_Color. The class has some XFA specific things like shadings and patterns in it and doesn't make sense as the colour base class. Change-Id: I1d2230b9f03a1017777ce673419926429b769e7c Reviewed-on: https://pdfium-review.googlesource.com/7752 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_fffield.cpp6
-rw-r--r--xfa/fxfa/app/cxfa_ffline.cpp4
-rw-r--r--xfa/fxfa/app/cxfa_ffpushbutton.cpp6
-rw-r--r--xfa/fxfa/app/cxfa_fwltheme.cpp2
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp22
5 files changed, 20 insertions, 20 deletions
diff --git a/xfa/fxfa/app/cxfa_fffield.cpp b/xfa/fxfa/app/cxfa_fffield.cpp
index fe56917cb6..09773b6737 100644
--- a/xfa/fxfa/app/cxfa_fffield.cpp
+++ b/xfa/fxfa/app/cxfa_fffield.cpp
@@ -23,8 +23,8 @@
#include "xfa/fxfa/cxfa_ffpageview.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_path.h"
+#include "xfa/fxgraphics/cxfa_color.h"
namespace {
@@ -93,7 +93,7 @@ void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS,
}
CXFA_FFDoc* pDoc = GetDoc();
- CFX_Color crHighlight(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc));
+ CXFA_Color crHighlight(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc));
pGS->SetFillColor(&crHighlight);
CFX_Path path;
if (bEllipse)
@@ -108,7 +108,7 @@ void CXFA_FFField::DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
if (!(m_dwStatus & XFA_WidgetStatus_Focused))
return;
- CFX_Color cr(0xFF000000);
+ CXFA_Color cr(0xFF000000);
pGS->SetStrokeColor(&cr);
float DashPattern[2] = {1, 1};
diff --git a/xfa/fxfa/app/cxfa_ffline.cpp b/xfa/fxfa/app/cxfa_ffline.cpp
index 67ed7ebd1a..dafa660a73 100644
--- a/xfa/fxfa/app/cxfa_ffline.cpp
+++ b/xfa/fxfa/app/cxfa_ffline.cpp
@@ -6,9 +6,9 @@
#include "xfa/fxfa/app/cxfa_ffline.h"
-#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_graphics.h"
#include "xfa/fxgraphics/cfx_path.h"
+#include "xfa/fxgraphics/cxfa_color.h"
CXFA_FFLine::CXFA_FFLine(CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pDataAcc) {}
@@ -88,7 +88,7 @@ void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS,
else
linePath.AddLine(rtLine.TopLeft(), rtLine.BottomRight());
- CFX_Color color(lineColor);
+ CXFA_Color color(lineColor);
pGS->SaveGraphState();
pGS->SetLineWidth(fLineWidth, true);
XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap);
diff --git a/xfa/fxfa/app/cxfa_ffpushbutton.cpp b/xfa/fxfa/app/cxfa_ffpushbutton.cpp
index 1e784a496e..21e4b977a1 100644
--- a/xfa/fxfa/app/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/cxfa_ffpushbutton.cpp
@@ -18,8 +18,8 @@
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffpageview.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
-#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_path.h"
+#include "xfa/fxgraphics/cxfa_color.h"
CXFA_FFPushButton::CXFA_FFPushButton(CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {}
@@ -213,7 +213,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
CFX_RectF rtFill(0, 0, m_pNormalWidget->GetWidgetRect().Size());
float fLineWith = GetLineWidth();
rtFill.Deflate(fLineWith, fLineWith);
- CFX_Color cr(FXARGB_MAKE(128, 128, 255, 255));
+ CXFA_Color cr(FXARGB_MAKE(128, 128, 255, 255));
pGraphics->SetFillColor(&cr);
CFX_Path path;
@@ -227,7 +227,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
float fLineWidth = GetLineWidth();
- CFX_Color cr(FXARGB_MAKE(255, 128, 255, 255));
+ CXFA_Color cr(FXARGB_MAKE(255, 128, 255, 255));
pGraphics->SetStrokeColor(&cr);
pGraphics->SetLineWidth(fLineWidth);
diff --git a/xfa/fxfa/app/cxfa_fwltheme.cpp b/xfa/fxfa/app/cxfa_fwltheme.cpp
index 5f8e1dc7dc..fbcbd75b6e 100644
--- a/xfa/fxfa/app/cxfa_fwltheme.cpp
+++ b/xfa/fxfa/app/cxfa_fwltheme.cpp
@@ -24,7 +24,7 @@
#include "xfa/fwl/cfwl_themetext.h"
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
-#include "xfa/fxgraphics/cfx_color.h"
+#include "xfa/fxgraphics/cxfa_color.h"
namespace {
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 0bc808f538..8a9841db2d 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -30,11 +30,11 @@
#include "xfa/fxfa/cxfa_widgetacc.h"
#include "xfa/fxfa/parser/cxfa_corner.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_graphics.h"
#include "xfa/fxgraphics/cfx_path.h"
#include "xfa/fxgraphics/cfx_pattern.h"
#include "xfa/fxgraphics/cfx_shading.h"
+#include "xfa/fxgraphics/cxfa_color.h"
CXFA_FFWidget::CXFA_FFWidget(CXFA_WidgetAcc* pDataAcc)
: CXFA_ContentLayoutItem(pDataAcc->GetNode()),
@@ -1541,7 +1541,7 @@ static void XFA_BOX_Fill_Radial(CXFA_Box box,
rtFill.Height() * rtFill.Height()) /
2,
true, true, crStart, crEnd);
- CFX_Color cr(&shading);
+ CXFA_Color cr(&shading);
pGS->SetFillColor(&cr);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
}
@@ -1576,7 +1576,7 @@ static void XFA_BOX_Fill_Pattern(CXFA_Box box,
}
CFX_Pattern pattern(iHatch, crEnd, crStart);
- CFX_Color cr(&pattern, 0x0);
+ CXFA_Color cr(&pattern, 0x0);
pGS->SetFillColor(&cr);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
}
@@ -1612,7 +1612,7 @@ static void XFA_BOX_Fill_Linear(CXFA_Box box,
break;
}
CFX_Shading shading(ptStart, ptEnd, false, false, crStart, crEnd);
- CFX_Color cr(&shading);
+ CXFA_Color cr(&shading);
pGS->SetFillColor(&cr);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
}
@@ -1655,7 +1655,7 @@ static void XFA_BOX_Fill(CXFA_Box box,
} else {
cr = fill.GetColor();
}
- CFX_Color fillColor(cr);
+ CXFA_Color fillColor(cr);
pGS->SetFillColor(&fillColor);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
} break;
@@ -1681,7 +1681,7 @@ static void XFA_BOX_StrokePath(CXFA_Stroke stroke,
pGS->SetLineCap(CFX_GraphStateData::LineCapButt);
XFA_StrokeTypeSetLineDash(pGS, stroke.GetStrokeType(),
XFA_ATTRIBUTEENUM_Butt);
- CFX_Color fxColor(stroke.GetColor());
+ CXFA_Color fxColor(stroke.GetColor());
pGS->SetStrokeColor(&fxColor);
pGS->StrokePath(pPath, pMatrix);
pGS->RestoreGraphState();
@@ -1748,7 +1748,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
arcPath.AddArc(rtWidget.TopLeft(), rtWidget.Size(), 3.0f * FX_PI / 4.0f,
FX_PI);
- CFX_Color cr(0xFF808080);
+ CXFA_Color cr(0xFF808080);
pGS->SetStrokeColor(&cr);
pGS->StrokePath(&arcPath, pMatrix);
arcPath.Clear();
@@ -1781,7 +1781,7 @@ static void XFA_Draw3DRect(CFX_Graphics* pGraphic,
CFX_Matrix* pMatrix,
FX_ARGB argbTopLeft,
FX_ARGB argbBottomRight) {
- CFX_Color crLT(argbTopLeft);
+ CXFA_Color crLT(argbTopLeft);
pGraphic->SetFillColor(&crLT);
float fBottom = rt.bottom();
float fRight = rt.right();
@@ -1795,7 +1795,7 @@ static void XFA_Draw3DRect(CFX_Graphics* pGraphic,
pathLT.LineTo(CFX_PointF(rt.left, fBottom));
pGraphic->FillPath(&pathLT, FXFILL_WINDING, pMatrix);
- CFX_Color crRB(argbBottomRight);
+ CXFA_Color crRB(argbBottomRight);
pGraphic->SetFillColor(&crRB);
CFX_Path pathRB;
@@ -1815,7 +1815,7 @@ static void XFA_BOX_Stroke_3DRect_Lowered(CFX_Graphics* pGS,
float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
- CFX_Color cr(0xFF000000);
+ CXFA_Color cr(0xFF000000);
pGS->SetFillColor(&cr);
CFX_Path path;
path.AddRectangle(rt.left, rt.top, rt.width, rt.height);
@@ -1830,7 +1830,7 @@ static void XFA_BOX_Stroke_3DRect_Raised(CFX_Graphics* pGS,
float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
- CFX_Color cr(0xFF000000);
+ CXFA_Color cr(0xFF000000);
pGS->SetFillColor(&cr);
CFX_Path path;
path.AddRectangle(rt.left, rt.top, rt.width, rt.height);