summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_defaultappearance.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-14 14:43:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 19:05:58 +0000
commit05df075154a832fcb476e1dfcfb865722d0ea898 (patch)
treeb8b771b62adae74d5d5ee561db75d10de3a848bf /core/fpdfdoc/cpdf_defaultappearance.cpp
parent6b94f01d1c8ad386d497428c7397b1a99614aeba (diff)
downloadpdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_defaultappearance.cpp')
-rw-r--r--core/fpdfdoc/cpdf_defaultappearance.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp
index 19767650f3..1873c1ae58 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.cpp
+++ b/core/fpdfdoc/cpdf_defaultappearance.cpp
@@ -37,7 +37,7 @@ CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
}
void CPDF_DefaultAppearance::GetFont(CFX_ByteString& csFontNameTag,
- FX_FLOAT& fFontSize) {
+ float& fFontSize) {
csFontNameTag = "";
fFontSize = 0;
if (m_csDA.IsEmpty())
@@ -110,7 +110,7 @@ CFX_ByteString CPDF_DefaultAppearance::GetColorString(
}
void CPDF_DefaultAppearance::GetColor(int& iColorType,
- FX_FLOAT fc[4],
+ float fc[4],
PaintOperation nOperation) {
iColorType = COLORTYPE_TRANSPARENT;
for (int c = 0; c < 4; c++)
@@ -156,29 +156,29 @@ void CPDF_DefaultAppearance::GetColor(FX_ARGB& color,
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
iColorType = COLORTYPE_GRAY;
- FX_FLOAT g = FX_atof(syntax.GetWord()) * 255 + 0.5f;
+ float g = FX_atof(syntax.GetWord()) * 255 + 0.5f;
color = ArgbEncode(255, (int)g, (int)g, (int)g);
return;
}
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "RG" : "rg"), 3)) {
iColorType = COLORTYPE_RGB;
- FX_FLOAT r = FX_atof(syntax.GetWord()) * 255 + 0.5f;
- FX_FLOAT g = FX_atof(syntax.GetWord()) * 255 + 0.5f;
- FX_FLOAT b = FX_atof(syntax.GetWord()) * 255 + 0.5f;
+ float r = FX_atof(syntax.GetWord()) * 255 + 0.5f;
+ float g = FX_atof(syntax.GetWord()) * 255 + 0.5f;
+ float b = FX_atof(syntax.GetWord()) * 255 + 0.5f;
color = ArgbEncode(255, (int)r, (int)g, (int)b);
return;
}
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "K" : "k"), 4)) {
iColorType = COLORTYPE_CMYK;
- FX_FLOAT c = FX_atof(syntax.GetWord());
- FX_FLOAT m = FX_atof(syntax.GetWord());
- FX_FLOAT y = FX_atof(syntax.GetWord());
- FX_FLOAT k = FX_atof(syntax.GetWord());
- FX_FLOAT r = 1.0f - std::min(1.0f, c + k);
- FX_FLOAT g = 1.0f - std::min(1.0f, m + k);
- FX_FLOAT b = 1.0f - std::min(1.0f, y + k);
+ float c = FX_atof(syntax.GetWord());
+ float m = FX_atof(syntax.GetWord());
+ float y = FX_atof(syntax.GetWord());
+ float k = FX_atof(syntax.GetWord());
+ float r = 1.0f - std::min(1.0f, c + k);
+ float g = 1.0f - std::min(1.0f, m + k);
+ float b = 1.0f - std::min(1.0f, y + k);
color = ArgbEncode(255, (int)(r * 255 + 0.5f), (int)(g * 255 + 0.5f),
(int)(b * 255 + 0.5f));
}
@@ -216,7 +216,7 @@ CFX_Matrix CPDF_DefaultAppearance::GetTextMatrix() {
if (!syntax.FindTagParamFromStart("Tm", 6))
return CFX_Matrix();
- FX_FLOAT f[6];
+ float f[6];
for (int i = 0; i < 6; i++)
f[i] = FX_atof(syntax.GetWord());
return CFX_Matrix(f);