Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 679) +++ trunk/src/obj_line.c (revision 680) @@ -2,7 +2,7 @@ * COPYRIGHT * * camv-rnd - electronics-related CAM viewer - * Copyright (C) 2019 Tibor 'Igor2' Palinkas + * Copyright (C) 2019,2023 Tibor 'Igor2' Palinkas * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,9 +40,20 @@ static void camv_line_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx) { + rnd_coord_t x1, y1, x2, y2; + + if (mx != NULL) { + x1 = rnd_xform_x((*mx), obj->line.x1, obj->line.y1); y1 = rnd_xform_y((*mx), obj->line.x1, obj->line.y1); + x2 = rnd_xform_x((*mx), obj->line.x2, obj->line.y2); y2 = rnd_xform_y((*mx), obj->line.x2, obj->line.y2); + } + else { + x1 = obj->line.x1; y1 = obj->line.y1; + x2 = obj->line.x2; y2 = obj->line.y2; + } + rnd_hid_set_line_cap(gc, rnd_cap_round); rnd_hid_set_line_width(gc, obj->line.thick); - rnd_render->draw_line(gc, obj->line.x1, obj->line.y1, obj->line.x2, obj->line.y2); + rnd_render->draw_line(gc, x1, y1, x2, y2); } static void camv_line_bbox(camv_any_obj_t *obj)