diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 16:31:44 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 16:31:44 -0500 |
commit | 435604d371de48044ae6c1567479b34e0d93e298 (patch) | |
tree | de6a27714d545afc11d83283b79acb17477f5b7d /third_party/agg23/agg_vcgen_stroke.cpp | |
parent | affe4b09575b297747e66bd0b807d2b1b04822fe (diff) | |
download | pdfium-435604d371de48044ae6c1567479b34e0d93e298.tar.xz |
Remove FXSYS_MulDiv(a, b, c).
This is a wrapper which does (a) * (b) / (c). Inline the operations.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1726893002 .
Diffstat (limited to 'third_party/agg23/agg_vcgen_stroke.cpp')
-rw-r--r-- | third_party/agg23/agg_vcgen_stroke.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/third_party/agg23/agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp index ef8bc27864..afc4ee6f9b 100644 --- a/third_party/agg23/agg_vcgen_stroke.cpp +++ b/third_party/agg23/agg_vcgen_stroke.cpp @@ -68,14 +68,13 @@ static inline void calc_butt_cap(FX_FLOAT* cap, const vertex_dist& v0, const vertex_dist& v1, FX_FLOAT len, - FX_FLOAT width) -{ - FX_FLOAT dx = FXSYS_MulDiv(v1.y - v0.y, width, len); - FX_FLOAT dy = FXSYS_MulDiv(v1.x - v0.x, width, len); - cap[0] = v0.x - dx; - cap[1] = v0.y + dy; - cap[2] = v0.x + dx; - cap[3] = v0.y - dy; + FX_FLOAT width) { + FX_FLOAT dx = (v1.y - v0.y) * width / len; + FX_FLOAT dy = (v1.x - v0.x) * width / len; + cap[0] = v0.x - dx; + cap[1] = v0.y + dy; + cap[2] = v0.x + dx; + cap[3] = v0.y - dy; } void vcgen_stroke::rewind(unsigned) { |