aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel.but3
-rw-r--r--drawing.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/devel.but b/devel.but
index a38fdda..6318b82 100644
--- a/devel.but
+++ b/devel.but
@@ -1928,6 +1928,9 @@ Indeed, even horizontal or vertical lines may be anti-aliased.
This function may be used for both drawing and printing.
+If the xpecified thickness is less than 1.0, 1.0 is used.
+This ensures that thin lines are visible even at small scales.
+
\S{drawing-draw-text} \cw{draw_text()}
\c void draw_text(drawing *dr, int x, int y, int fonttype,
diff --git a/drawing.c b/drawing.c
index 7f4a6cf..a10a7f0 100644
--- a/drawing.c
+++ b/drawing.c
@@ -90,6 +90,8 @@ void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour)
void draw_thick_line(drawing *dr, float thickness,
float x1, float y1, float x2, float y2, int colour)
{
+ if (thickness < 1.0)
+ thickness = 1.0;
if (dr->api->draw_thick_line) {
dr->api->draw_thick_line(dr->handle, thickness,
x1, y1, x2, y2, colour);