summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_apsettings.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-16 11:35:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-16 16:23:11 +0000
commit8e7f932410732a4f05d2e69e9ff66277f54d1bd7 (patch)
tree963cf7fd3558da33edbc8b4e9ce52107d574037e /core/fpdfdoc/cpdf_apsettings.cpp
parenta74a6277a0913a674719da3134efd877a5e8d091 (diff)
downloadpdfium-8e7f932410732a4f05d2e69e9ff66277f54d1bd7.tar.xz
Convert CPVT_Color to CFX_Color
This CL converts the use of CPVT_Color to CFX_Color and removes the CPVT_Color class. Change-Id: I86a2d06524cd8f0fbce2335f0185426cc41dbe84 Reviewed-on: https://pdfium-review.googlesource.com/16030 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_apsettings.cpp')
-rw-r--r--core/fpdfdoc/cpdf_apsettings.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfdoc/cpdf_apsettings.cpp b/core/fpdfdoc/cpdf_apsettings.cpp
index 0fc9c202cb..076cdd9b9e 100644
--- a/core/fpdfdoc/cpdf_apsettings.cpp
+++ b/core/fpdfdoc/cpdf_apsettings.cpp
@@ -10,7 +10,7 @@
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
-#include "core/fpdfdoc/cpdf_formcontrol.h"
+#include "core/fxge/cfx_color.h"
CPDF_ApSettings::CPDF_ApSettings(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
@@ -28,7 +28,7 @@ int CPDF_ApSettings::GetRotation() const {
FX_ARGB CPDF_ApSettings::GetColor(int& iColorType,
const ByteString& csEntry) const {
- iColorType = COLORTYPE_TRANSPARENT;
+ iColorType = CFX_Color::kTransparent;
if (!m_pDict)
return 0;
@@ -39,19 +39,19 @@ FX_ARGB CPDF_ApSettings::GetColor(int& iColorType,
FX_ARGB color = 0;
size_t dwCount = pEntry->GetCount();
if (dwCount == 1) {
- iColorType = COLORTYPE_GRAY;
+ iColorType = CFX_Color::kGray;
float g = pEntry->GetNumberAt(0) * 255;
return ArgbEncode(255, (int)g, (int)g, (int)g);
}
if (dwCount == 3) {
- iColorType = COLORTYPE_RGB;
+ iColorType = CFX_Color::kRGB;
float r = pEntry->GetNumberAt(0) * 255;
float g = pEntry->GetNumberAt(1) * 255;
float b = pEntry->GetNumberAt(2) * 255;
return ArgbEncode(255, (int)r, (int)g, (int)b);
}
if (dwCount == 4) {
- iColorType = COLORTYPE_CMYK;
+ iColorType = CFX_Color::kCMYK;
float c = pEntry->GetNumberAt(0);
float m = pEntry->GetNumberAt(1);
float y = pEntry->GetNumberAt(2);
@@ -76,7 +76,7 @@ float CPDF_ApSettings::GetOriginalColor(int index,
void CPDF_ApSettings::GetOriginalColor(int& iColorType,
float fc[4],
const ByteString& csEntry) const {
- iColorType = COLORTYPE_TRANSPARENT;
+ iColorType = CFX_Color::kTransparent;
for (int i = 0; i < 4; i++)
fc[i] = 0;
@@ -89,15 +89,15 @@ void CPDF_ApSettings::GetOriginalColor(int& iColorType,
size_t dwCount = pEntry->GetCount();
if (dwCount == 1) {
- iColorType = COLORTYPE_GRAY;
+ iColorType = CFX_Color::kGray;
fc[0] = pEntry->GetNumberAt(0);
} else if (dwCount == 3) {
- iColorType = COLORTYPE_RGB;
+ iColorType = CFX_Color::kRGB;
fc[0] = pEntry->GetNumberAt(0);
fc[1] = pEntry->GetNumberAt(1);
fc[2] = pEntry->GetNumberAt(2);
} else if (dwCount == 4) {
- iColorType = COLORTYPE_CMYK;
+ iColorType = CFX_Color::kCMYK;
fc[0] = pEntry->GetNumberAt(0);
fc[1] = pEntry->GetNumberAt(1);
fc[2] = pEntry->GetNumberAt(2);