summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_utils.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-13 14:17:10 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 19:08:45 +0000
commit7f55a5410f665cfdbb5796d6d9a5387a5f6fa2eb (patch)
tree7211973789a60892f27db6e2810f805ff0bd8f37 /fpdfsdk/pdfwindow/cpwl_utils.cpp
parentfe75997a8a8d7fc555d91c3aad595112a46ad7a2 (diff)
downloadpdfium-7f55a5410f665cfdbb5796d6d9a5387a5f6fa2eb.tar.xz
Rename CPWL_Color to CFX_Color
This CL moves fpdfsdk/pdfwindow/cpwl_color to core/fxge/cfx_color. Change-Id: Ia95b7fba2c76a1b9a438014d3598c7aa55bbb2ab Reviewed-on: https://pdfium-review.googlesource.com/7753 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_utils.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_utils.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_utils.cpp b/fpdfsdk/pdfwindow/cpwl_utils.cpp
index 238abe7488..c576044a69 100644
--- a/fpdfsdk/pdfwindow/cpwl_utils.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_utils.cpp
@@ -219,7 +219,7 @@ CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CFX_FloatRect& crBBox,
}
CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect,
- const CPWL_Color& color) {
+ const CFX_Color& color) {
std::ostringstream sAppStream;
CFX_ByteString sColor = GetColorAppStream(color, true);
if (sColor.GetLength() > 0) {
@@ -233,7 +233,7 @@ CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect,
}
CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CFX_FloatRect& rect,
- const CPWL_Color& color) {
+ const CFX_Color& color) {
std::ostringstream sAppStream;
CFX_ByteString sColor = GetColorAppStream(color, true);
if (sColor.GetLength() > 0)
@@ -261,7 +261,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
CPDF_Stream* pIconStream,
CPDF_IconFit& IconFit,
const CFX_WideString& sLabel,
- const CPWL_Color& crText,
+ const CFX_Color& crText,
float fFontSize,
int32_t nLayOut) {
const float fAutoFontScale = 1.0f / 3.0f;
@@ -456,7 +456,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox,
return CFX_ByteString(sAppStream);
}
-CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color& color,
+CFX_ByteString CPWL_Utils::GetColorAppStream(const CFX_Color& color,
const bool& bFillOrStroke) {
std::ostringstream sColorStream;
@@ -482,9 +482,9 @@ CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color& color,
CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect,
float fWidth,
- const CPWL_Color& color,
- const CPWL_Color& crLeftTop,
- const CPWL_Color& crRightBottom,
+ const CFX_Color& color,
+ const CFX_Color& crLeftTop,
+ const CFX_Color& crRightBottom,
BorderStyle nStyle,
const CPWL_Dash& dash) {
std::ostringstream sAppStream;
@@ -599,9 +599,9 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect,
CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(
const CFX_FloatRect& rect,
float fWidth,
- const CPWL_Color& color,
- const CPWL_Color& crLeftTop,
- const CPWL_Color& crRightBottom,
+ const CFX_Color& color,
+ const CFX_Color& crLeftTop,
+ const CFX_Color& crRightBottom,
BorderStyle nStyle,
const CPWL_Dash& dash) {
std::ostringstream sAppStream;
@@ -710,7 +710,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(
}
CFX_ByteString CPWL_Utils::GetAppStream_Check(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n"
<< CPWL_Utils::GetColorAppStream(crText, true)
@@ -719,7 +719,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Check(const CFX_FloatRect& rcBBox,
}
CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n"
<< CPWL_Utils::GetColorAppStream(crText, true)
@@ -728,7 +728,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox,
}
CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n"
<< CPWL_Utils::GetColorAppStream(crText, false)
@@ -737,7 +737,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox,
}
CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n1 w\n"
<< CPWL_Utils::GetColorAppStream(crText, true)
@@ -746,7 +746,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox,
}
CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n"
<< CPWL_Utils::GetColorAppStream(crText, true)
@@ -755,7 +755,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox,
}
CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
std::ostringstream sAP;
sAP << "q\n"
<< CPWL_Utils::GetColorAppStream(crText, true)
@@ -765,7 +765,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox,
CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CFX_FloatRect& rcBBox,
int32_t nStyle,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
CFX_FloatRect rcCenter = rcBBox.GetCenterSquare();
switch (nStyle) {
default:
@@ -790,7 +790,7 @@ CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CFX_FloatRect& rcBBox,
CFX_ByteString CPWL_Utils::GetRadioButtonAppStream(const CFX_FloatRect& rcBBox,
int32_t nStyle,
- const CPWL_Color& crText) {
+ const CFX_Color& crText) {
CFX_FloatRect rcCenter = rcBBox.GetCenterSquare();
switch (nStyle) {
default:
@@ -820,8 +820,8 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CFX_FloatRect& rcBBox) {
std::ostringstream sAppStream;
sAppStream << "q\n"
<< CPWL_Utils::GetColorAppStream(
- CPWL_Color(COLORTYPE_RGB, 220.0f / 255.0f, 220.0f / 255.0f,
- 220.0f / 255.0f),
+ CFX_Color(COLORTYPE_RGB, 220.0f / 255.0f, 220.0f / 255.0f,
+ 220.0f / 255.0f),
true)
<< rcBBox.left << " " << rcBBox.bottom << " "
<< rcBBox.right - rcBBox.left << " " << rcBBox.top - rcBBox.bottom
@@ -830,9 +830,9 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CFX_FloatRect& rcBBox) {
sAppStream << "q\n"
<< CPWL_Utils::GetBorderAppStream(
- rcBBox, 2, CPWL_Color(COLORTYPE_GRAY, 0),
- CPWL_Color(COLORTYPE_GRAY, 1),
- CPWL_Color(COLORTYPE_GRAY, 0.5), BorderStyle::BEVELED,
+ rcBBox, 2, CFX_Color(COLORTYPE_GRAY, 0),
+ CFX_Color(COLORTYPE_GRAY, 1),
+ CFX_Color(COLORTYPE_GRAY, 0.5), BorderStyle::BEVELED,
CPWL_Dash(3, 0, 0))
<< "Q\n";
@@ -909,7 +909,7 @@ void CPWL_Utils::DrawStrokeLine(CFX_RenderDevice* pDevice,
void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
- const CPWL_Color& color,
+ const CFX_Color& color,
int32_t nTransparency) {
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rect,
color.ToFXColor(nTransparency));
@@ -954,9 +954,9 @@ void CPWL_Utils::DrawBorder(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
const CFX_FloatRect& rect,
float fWidth,
- const CPWL_Color& color,
- const CPWL_Color& crLeftTop,
- const CPWL_Color& crRightBottom,
+ const CFX_Color& color,
+ const CFX_Color& crLeftTop,
+ const CFX_Color& crRightBottom,
BorderStyle nStyle,
int32_t nTransparency) {
float fLeft = rect.left;