From 94cc66a4533d3aa419a6145ad1952d3d7a44b1d9 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 2 Mar 2026 17:56:06 +0100 Subject: [PATCH] draw_graph(): add bbox setting (clip area) when drawing cursor values to avoid off-graph rectangle text drawing --- src/draw.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/draw.c b/src/draw.c index ace1828b..720f306b 100644 --- a/src/draw.c +++ b/src/draw.c @@ -4539,12 +4539,11 @@ void draw_graph(int i, int flags, Graph_ctx *gr, void *ct) my_free(_ALLOC_ID_, &color); my_free(_ALLOC_ID_, &sweep); } /* if(flags & 8) */ - /* - * bbox(START, 0.0, 0.0, 0.0, 0.0); - * bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2); - * bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0); - */ + if(flags & 8) { + bbox(START, 0.0, 0.0, 0.0, 0.0); + bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2); + bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0); /* cursor1 */ if((flags & 2)) draw_cursor(cursor1, cursor2, 1, gr); /* cursor2 */ @@ -4557,6 +4556,7 @@ void draw_graph(int i, int flags, Graph_ctx *gr, void *ct) if(flags & 128) draw_hcursor(gr->hcursor1_y, 15, gr); /* hcursor2 */ if(flags & 256) draw_hcursor(gr->hcursor2_y, 19, gr); + bbox(END, 0.0, 0.0, 0.0, 0.0); } if(flags & 1) { /* copy save buffer to screen */ if(!xctx->draw_window) { @@ -4569,7 +4569,6 @@ void draw_graph(int i, int flags, Graph_ctx *gr, void *ct) } } - /* bbox(END, 0.0, 0.0, 0.0, 0.0); */ } /* flags: