Menu

#82 patch: add support for rendering rectangle & line segment curves

open
patch (3)
5
2023-05-11
2023-05-11
Anonymous
No

Patch changes:

  • Adds QwtPlotRectCurve - renders a series of rectangles with specified brush & pen.
  • Adds QwtPlotSegmentCurve - renders a series of line segments with specified pen
  • Adds playground/plotdemo - a demo application with tabs per feature

Motivation: with these new types of curves one can create a chart with activities spanning over time and connected to one another. Rather then creating thousands of individual rectangles / lines, each "curve" groups related rectangles / segments into a single item.

1 Attachments

Discussion

  • Gregory Shklover

    Added an example plot

     
  • Uwe Rathmann

    Uwe Rathmann - 2023-05-11

    Could you please submit 2 different patches ?

    A curve segment might consist of more/less than 2 points - so IMO the name is misleading. Note, that there is also QwtPlotIntervalCurve. It also allows to draw - at least horizontal/vertical lines.

    A side note: of course there is some overhead in converting rectangles/lines into a QPainterPath elements and you won't have any optimizations like early clipping, but QwtPlotShapeItem would allow you display your rectangles/lines with one plot item.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB