From 05df075154a832fcb476e1dfcfb865722d0ea898 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Mar 2017 14:43:42 -0400 Subject: Replace FX_FLOAT with underlying float type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña --- xfa/fde/fde_gedevice.cpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'xfa/fde/fde_gedevice.cpp') diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index db05f76241..3c6ca9b37e 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -24,9 +24,9 @@ CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice, ASSERT(pDevice); FX_RECT rt = m_pDevice->GetClipBox(); - m_rtClip = CFX_RectF( - static_cast(rt.left), static_cast(rt.top), - static_cast(rt.Width()), static_cast(rt.Height())); + m_rtClip = CFX_RectF(static_cast(rt.left), static_cast(rt.top), + static_cast(rt.Width()), + static_cast(rt.Height())); } CFDE_RenderDevice::~CFDE_RenderDevice() { @@ -49,9 +49,9 @@ void CFDE_RenderDevice::SaveState() { void CFDE_RenderDevice::RestoreState() { m_pDevice->RestoreState(false); const FX_RECT& rt = m_pDevice->GetClipBox(); - m_rtClip = CFX_RectF( - static_cast(rt.left), static_cast(rt.top), - static_cast(rt.Width()), static_cast(rt.Height())); + m_rtClip = CFX_RectF(static_cast(rt.left), static_cast(rt.top), + static_cast(rt.Width()), + static_cast(rt.Height())); } bool CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { @@ -74,11 +74,11 @@ CFDE_Path* CFDE_RenderDevice::GetClipPath() const { return nullptr; } -FX_FLOAT CFDE_RenderDevice::GetDpiX() const { +float CFDE_RenderDevice::GetDpiX() const { return 96; } -FX_FLOAT CFDE_RenderDevice::GetDpiY() const { +float CFDE_RenderDevice::GetDpiY() const { return 96; } @@ -91,8 +91,8 @@ bool CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib, if (pSrcRect) { srcRect = *pSrcRect; } else { - srcRect = CFX_RectF(0, 0, static_cast(pDib->GetWidth()), - static_cast(pDib->GetHeight())); + srcRect = CFX_RectF(0, 0, static_cast(pDib->GetWidth()), + static_cast(pDib->GetHeight())); } if (srcRect.IsEmpty()) @@ -124,7 +124,7 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, const CFX_RetainPtr& pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, - FX_FLOAT fFontSize, + float fFontSize, const CFX_Matrix* pMatrix) { ASSERT(pBrush && pFont && pCharPos && iCount > 0); CFX_Font* pFxFont = pFont->GetDevFont(); @@ -132,9 +132,9 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 && !pFxFont->IsItalic()) { FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; - FX_FLOAT* pAM; + float* pAM; for (int32_t i = 0; i < iCount; ++i) { - static const FX_FLOAT mc = 0.267949f; + static const float mc = 0.267949f; pAM = pCP->m_AdjustMatrix; pAM[2] = mc * pAM[0] + pAM[2]; pAM[3] = mc * pAM[1] + pAM[3]; @@ -205,7 +205,7 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, } bool CFDE_RenderDevice::DrawBezier(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const CFX_PointF& pt1, const CFX_PointF& pt2, const CFX_PointF& pt3, @@ -222,10 +222,10 @@ bool CFDE_RenderDevice::DrawBezier(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawCurve(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const std::vector& points, bool bClosed, - FX_FLOAT fTension, + float fTension, const CFX_Matrix* pMatrix) { CFDE_Path path; path.AddCurve(points, bClosed, fTension); @@ -233,7 +233,7 @@ bool CFDE_RenderDevice::DrawCurve(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawEllipse(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const CFX_RectF& rect, const CFX_Matrix* pMatrix) { CFDE_Path path; @@ -242,7 +242,7 @@ bool CFDE_RenderDevice::DrawEllipse(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawLines(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const std::vector& points, const CFX_Matrix* pMatrix) { CFDE_Path path; @@ -251,7 +251,7 @@ bool CFDE_RenderDevice::DrawLines(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawLine(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const CFX_PointF& pt1, const CFX_PointF& pt2, const CFX_Matrix* pMatrix) { @@ -261,7 +261,7 @@ bool CFDE_RenderDevice::DrawLine(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const CFDE_Path* pPath, const CFX_Matrix* pMatrix) { CFDE_Path* pGePath = (CFDE_Path*)pPath; @@ -277,7 +277,7 @@ bool CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawPolygon(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const std::vector& points, const CFX_Matrix* pMatrix) { CFDE_Path path; @@ -286,7 +286,7 @@ bool CFDE_RenderDevice::DrawPolygon(CFDE_Pen* pPen, } bool CFDE_RenderDevice::DrawRectangle(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, const CFX_RectF& rect, const CFX_Matrix* pMatrix) { CFDE_Path path; @@ -296,7 +296,7 @@ bool CFDE_RenderDevice::DrawRectangle(CFDE_Pen* pPen, bool CFDE_RenderDevice::FillClosedCurve(CFDE_Brush* pBrush, const std::vector& points, - FX_FLOAT fTension, + float fTension, const CFX_Matrix* pMatrix) { CFDE_Path path; path.AddCurve(points, true, fTension); @@ -328,7 +328,7 @@ bool CFDE_RenderDevice::FillRectangle(CFDE_Brush* pBrush, } bool CFDE_RenderDevice::CreatePen(CFDE_Pen* pPen, - FX_FLOAT fPenWidth, + float fPenWidth, CFX_GraphStateData& graphState) { if (!pPen) return false; -- cgit v1.2.3