summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
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/fpdfapi/edit
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/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp8
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index 35595b3e1f..20af9b7c2e 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -33,7 +33,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& ar, const CFX_Matrix& matrix) {
return ar;
}
-bool GetColor(const CPDF_Color* pColor, FX_FLOAT* rgb) {
+bool GetColor(const CPDF_Color* pColor, float* rgb) {
int intRGB[3];
if (!pColor ||
pColor->GetColorSpace() != CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB) ||
@@ -201,17 +201,17 @@ void CPDF_PageContentGenerator::ProcessPath(CFX_ByteTextBuf* buf,
void CPDF_PageContentGenerator::ProcessGraphics(CFX_ByteTextBuf* buf,
CPDF_PageObject* pPageObj) {
*buf << "q ";
- FX_FLOAT fillColor[3];
+ float fillColor[3];
if (GetColor(pPageObj->m_ColorState.GetFillColor(), fillColor)) {
*buf << fillColor[0] << " " << fillColor[1] << " " << fillColor[2]
<< " rg ";
}
- FX_FLOAT strokeColor[3];
+ float strokeColor[3];
if (GetColor(pPageObj->m_ColorState.GetStrokeColor(), strokeColor)) {
*buf << strokeColor[0] << " " << strokeColor[1] << " " << strokeColor[2]
<< " RG ";
}
- FX_FLOAT lineWidth = pPageObj->m_GraphState.GetLineWidth();
+ float lineWidth = pPageObj->m_GraphState.GetLineWidth();
if (lineWidth != 1.0f)
*buf << lineWidth << " w ";
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
index d8813ba30f..b9510b7803 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
@@ -107,11 +107,11 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessGraphics) {
pPathObj->m_FillType = FXFILL_WINDING;
pPathObj->m_bStroke = true;
- FX_FLOAT rgb[3] = {0.5f, 0.7f, 0.35f};
+ float rgb[3] = {0.5f, 0.7f, 0.35f};
CPDF_ColorSpace* pCS = CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB);
pPathObj->m_ColorState.SetFillColor(pCS, rgb, 3);
- FX_FLOAT rgb2[3] = {1, 0.9f, 0};
+ float rgb2[3] = {1, 0.9f, 0};
pPathObj->m_ColorState.SetStrokeColor(pCS, rgb2, 3);
pPathObj->m_GeneralState.SetFillAlpha(0.5f);
pPathObj->m_GeneralState.SetStrokeAlpha(0.8f);