summaryrefslogtreecommitdiff
path: root/third_party/agg23/agg_shorten_path.h
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 /third_party/agg23/agg_shorten_path.h
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 'third_party/agg23/agg_shorten_path.h')
-rw-r--r--third_party/agg23/agg_shorten_path.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/agg23/agg_shorten_path.h b/third_party/agg23/agg_shorten_path.h
index d7eb4be018..2f62ec52d2 100644
--- a/third_party/agg23/agg_shorten_path.h
+++ b/third_party/agg23/agg_shorten_path.h
@@ -20,11 +20,11 @@
namespace agg
{
template<class VertexSequence>
-void shorten_path(VertexSequence& vs, FX_FLOAT s, unsigned closed = 0)
+void shorten_path(VertexSequence& vs, float s, unsigned closed = 0)
{
typedef typename VertexSequence::value_type vertex_type;
if(s > 0 && vs.size() > 1) {
- FX_FLOAT d;
+ float d;
int n = int(vs.size() - 2);
while(n) {
d = vs[n].dist;
@@ -42,8 +42,8 @@ void shorten_path(VertexSequence& vs, FX_FLOAT s, unsigned closed = 0)
vertex_type& prev = vs[n - 1];
vertex_type& last = vs[n];
d = (prev.dist - s) / prev.dist;
- FX_FLOAT x = prev.x + (last.x - prev.x) * d;
- FX_FLOAT y = prev.y + (last.y - prev.y) * d;
+ float x = prev.x + (last.x - prev.x) * d;
+ float y = prev.y + (last.y - prev.y) * d;
last.x = x;
last.y = y;
if(!prev(last)) {