summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfannot.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 /fpdfsdk/fpdfannot.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 'fpdfsdk/fpdfannot.cpp')
-rw-r--r--fpdfsdk/fpdfannot.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfannot.cpp b/fpdfsdk/fpdfannot.cpp
index 3125ad1a82..a671032b1e 100644
--- a/fpdfsdk/fpdfannot.cpp
+++ b/fpdfsdk/fpdfannot.cpp
@@ -20,8 +20,8 @@
#include "core/fpdfdoc/cpdf_annot.h"
#include "core/fpdfdoc/cpdf_formfield.h"
#include "core/fpdfdoc/cpdf_interform.h"
-#include "core/fpdfdoc/cpvt_color.h"
#include "core/fpdfdoc/cpvt_generateap.h"
+#include "core/fxge/cfx_color.h"
#include "fpdfsdk/fsdk_define.h"
namespace {
@@ -536,24 +536,25 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
}
return true;
}
- CPVT_Color color = CPVT_Color::ParseColor(*pColor);
+
+ CFX_Color color = CFX_Color::ParseColor(*pColor);
switch (color.nColorType) {
- case CPVT_Color::kRGB:
+ case CFX_Color::kRGB:
*R = color.fColor1 * 255.f;
*G = color.fColor2 * 255.f;
*B = color.fColor3 * 255.f;
break;
- case CPVT_Color::kGray:
+ case CFX_Color::kGray:
*R = 255.f * color.fColor1;
*G = 255.f * color.fColor1;
*B = 255.f * color.fColor1;
break;
- case CPVT_Color::kCMYK:
+ case CFX_Color::kCMYK:
*R = 255.f * (1 - color.fColor1) * (1 - color.fColor4);
*G = 255.f * (1 - color.fColor2) * (1 - color.fColor4);
*B = 255.f * (1 - color.fColor3) * (1 - color.fColor4);
break;
- case CPVT_Color::kTransparent:
+ case CFX_Color::kTransparent:
*R = 0;
*G = 0;
*B = 0;