LibreCad-2.2.0.alpha - Need help with drawing a line in C++

Posted by mad-hatter on
URL: https://forum.librecad.org/LibreCad-2-2-0-alpha-Need-help-with-drawing-a-line-in-C-tp5715519.html

Hello,

I wonder if somebody could help?
I'm writng an add on (C++) for LibreCad that will allow one to divide an entity
in to multiple even segments, so far I've managed to select a line, drawn at any
position and angle , divide it and get a list of x-y pairs. I can't work out which
of the existing functions to use to draw my dividing lines. I'll think about dividing
the line later, for now I just want be able to draw lines.
Suggestions please.

Redards

When finished I'll make it available to LibreCad users.

//Data I have:-
line x1-y1, x2-y2   -11.6315 -12.8005  -   -10.2243 -14.8783   on layer 2
line x1-y1, x2-y2   -4.70536 -8.10979  -   -3.29815 -10.1876   on layer 2
line x1-y1, x2-y2   2.22076 -3.41909   -   3.62797 -5.49692    on layer 2
line x1-y1, x2-y2   9.14688 1.27162    -   10.5541 -0.806215   on layer 2
line x1-y1, x2-y2   16.073 5.96233     -   17.4802 3.88449     on layer 2