diff options
-rw-r--r-- | generic/Draw.h | 3 | ||||
-rw-r--r-- | generic/Geo.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/generic/Draw.h b/generic/Draw.h index 6005b8d..d768c1d 100644 --- a/generic/Draw.h +++ b/generic/Draw.h @@ -60,6 +60,9 @@ void GetPolygonReliefBBox(ZnList points, unsigned int line_width, ZnBBox *bbox); double PolygonReliefToPointDist(ZnList points, unsigned int line_width, ZnPoint *pp); +void DrawRectangleRelief(struct _WidgetInfo *wi, + ReliefStyle relief, ZnColorGradient gradient, + XRectangle *bbox, unsigned int line_width); void DrawPolygonRelief(struct _WidgetInfo *wi, ReliefStyle relief, ZnColorGradient gradient, ZnPoint *points, int num_points, int line_width); diff --git a/generic/Geo.c b/generic/Geo.c index 069f53c..2ae242b 100644 --- a/generic/Geo.c +++ b/generic/Geo.c @@ -498,10 +498,11 @@ ShiftLine(ZnPoint *p1, else { dy_neg = False; } - if ((ABS(dy) < PRECISION_LIMIT) && (ABS(dx) < PRECISION_LIMIT)) { + if ((dy < PRECISION_LIMIT) && (dx < PRECISION_LIMIT)) { printf("ShiftLine: segment is a point\n"); return; } + if (dy <= dx) { dy = ((dist * shift_table[(dy*128)/dx]) + 64) / 128; if (!dx_neg) { |