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 --- third_party/agg23/agg_clip_liang_barsky.h | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'third_party/agg23/agg_clip_liang_barsky.h') diff --git a/third_party/agg23/agg_clip_liang_barsky.h b/third_party/agg23/agg_clip_liang_barsky.h index 5b1261f004..31b35fe96e 100644 --- a/third_party/agg23/agg_clip_liang_barsky.h +++ b/third_party/agg23/agg_clip_liang_barsky.h @@ -36,45 +36,45 @@ inline unsigned clip_liang_barsky(T x1, T y1, T x2, T y2, const rect_base& clip_box, T* x, T* y) { - const FX_FLOAT nearzero = 1e-30f; + const float nearzero = 1e-30f; - pdfium::base::CheckedNumeric width = x2; + pdfium::base::CheckedNumeric width = x2; width -= x1; if (!width.IsValid()) return 0; - pdfium::base::CheckedNumeric height = y2; + pdfium::base::CheckedNumeric height = y2; height -= y1; if (!height.IsValid()) return 0; - FX_FLOAT deltax = width.ValueOrDefault(0); - FX_FLOAT deltay = height.ValueOrDefault(0); + float deltax = width.ValueOrDefault(0); + float deltay = height.ValueOrDefault(0); unsigned np = 0; if(deltax == 0) { deltax = (x1 > clip_box.x1) ? -nearzero : nearzero; } - FX_FLOAT xin, xout; + float xin, xout; if(deltax > 0) { - xin = (FX_FLOAT)clip_box.x1; - xout = (FX_FLOAT)clip_box.x2; + xin = (float)clip_box.x1; + xout = (float)clip_box.x2; } else { - xin = (FX_FLOAT)clip_box.x2; - xout = (FX_FLOAT)clip_box.x1; + xin = (float)clip_box.x2; + xout = (float)clip_box.x1; } - FX_FLOAT tinx = (xin - x1) / deltax; + float tinx = (xin - x1) / deltax; if(deltay == 0) { deltay = (y1 > clip_box.y1) ? -nearzero : nearzero; } - FX_FLOAT yin, yout; + float yin, yout; if(deltay > 0) { - yin = (FX_FLOAT)clip_box.y1; - yout = (FX_FLOAT)clip_box.y2; + yin = (float)clip_box.y1; + yout = (float)clip_box.y2; } else { - yin = (FX_FLOAT)clip_box.y2; - yout = (FX_FLOAT)clip_box.y1; + yin = (float)clip_box.y2; + yout = (float)clip_box.y1; } - FX_FLOAT tiny = (yin - y1) / deltay; - FX_FLOAT tin1, tin2; + float tiny = (yin - y1) / deltay; + float tin1, tin2; if (tinx < tiny) { tin1 = tinx; tin2 = tiny; @@ -89,9 +89,9 @@ inline unsigned clip_liang_barsky(T x1, T y1, T x2, T y2, ++np; } if(tin2 <= 1.0f) { - FX_FLOAT toutx = (xout - x1) / deltax; - FX_FLOAT touty = (yout - y1) / deltay; - FX_FLOAT tout1 = (toutx < touty) ? toutx : touty; + float toutx = (xout - x1) / deltax; + float touty = (yout - y1) / deltay; + float tout1 = (toutx < touty) ? toutx : touty; if (tin2 > 0 || tout1 > 0) { if(tin2 <= tout1) { if(tin2 > 0) { -- cgit v1.2.3