possibility of drawing a polygon with the mouse to save a pattern
Hello,
Is it feasible to draw a polygon around a Qwt line curve with the mouse ? Because I want to save the polygon points (the scale values not the pixels) and be able later to load them and draw them in order to validate if a line curve fits inside the polygon points (both visually and programmatically : true/false).
If someone has already done this or has a better idea to validate if data fits within some borders (defined by a polygon), I'll take it.
Thanks.
Re: possibility of drawing a polygon with the mouse to save a pattern
OK, I found how to do it, I will share my solution once I finish it.
Re: possibility of drawing a polygon with the mouse to save a pattern
This thread https://www.qtcentre.org/threads/512...use-on-qwtpolt gave me insights. I don't really have time to post my solution. In short use a polygonal picker, after drawing the polygon, this last can send you the points via a signal. Then just store these points (with the proper transformation to axis values) in QPolygonF and feed this last to a QPainterPath. Create a QwtPlotShapeItem and use the QPainterPath to define its shape.