summaryrefslogtreecommitdiff
path: root/draw/draw_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw/draw_path.c')
-rw-r--r--draw/draw_path.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/draw/draw_path.c b/draw/draw_path.c
index 755283b7..b0889279 100644
--- a/draw/draw_path.c
+++ b/draw/draw_path.c
@@ -28,10 +28,10 @@ bezier(fz_gel *gel, fz_matrix *ctm, float flatness,
float xabcd, yabcd;
/* termination check */
- dmax = ABS(xa - xb);
- dmax = MAX(dmax, ABS(ya - yb));
- dmax = MAX(dmax, ABS(xd - xc));
- dmax = MAX(dmax, ABS(yd - yc));
+ dmax = fz_abs(xa - xb);
+ dmax = fz_max(dmax, fz_abs(ya - yb));
+ dmax = fz_max(dmax, fz_abs(xd - xc));
+ dmax = fz_max(dmax, fz_abs(yd - yc));
if (dmax < flatness || depth >= MAX_DEPTH)
{
line(gel, ctm, xa, ya, xd, yd);
@@ -499,10 +499,10 @@ fz_stroke_bezier(struct sctx *s,
float xabcd, yabcd;
/* termination check */
- dmax = ABS(xa - xb);
- dmax = MAX(dmax, ABS(ya - yb));
- dmax = MAX(dmax, ABS(xd - xc));
- dmax = MAX(dmax, ABS(yd - yc));
+ dmax = fz_abs(xa - xb);
+ dmax = fz_max(dmax, fz_abs(ya - yb));
+ dmax = fz_max(dmax, fz_abs(xd - xc));
+ dmax = fz_max(dmax, fz_abs(yd - yc));
if (dmax < s->flatness || depth >= MAX_DEPTH)
{
fz_point p;
@@ -705,10 +705,10 @@ fz_dash_bezier(struct sctx *s,
float xabcd, yabcd;
/* termination check */
- dmax = ABS(xa - xb);
- dmax = MAX(dmax, ABS(ya - yb));
- dmax = MAX(dmax, ABS(xd - xc));
- dmax = MAX(dmax, ABS(yd - yc));
+ dmax = fz_abs(xa - xb);
+ dmax = fz_max(dmax, fz_abs(ya - yb));
+ dmax = fz_max(dmax, fz_abs(xd - xc));
+ dmax = fz_max(dmax, fz_abs(yd - yc));
if (dmax < s->flatness || depth >= MAX_DEPTH)
{
fz_point p;
@@ -780,7 +780,7 @@ fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, fz_mat
phase_len = 0;
for (i = 0; i < stroke->dash_len; i++)
phase_len += stroke->dash_list[i];
- max_expand = MAX(MAX(fabs(ctm.a),fabs(ctm.b)),MAX(fabs(ctm.c),fabs(ctm.d)));
+ max_expand = fz_max(fz_max(fz_abs(ctm.a),fz_abs(ctm.b)),fz_max(fz_abs(ctm.c),fz_abs(ctm.d)));
if (phase_len < 0.01f || phase_len * max_expand < 0.5f)
{
fz_flatten_stroke_path(gel, path, stroke, ctm, flatness, linewidth);