Results 1 to 4 of 4

Thread: Fill area between two baselines(one at top, one at bottom.

  1. #1
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Fill area between two baselines(one at top, one at bottom.

    I intend to fill the area on curve between two lines(in my case horizontal). I believe for only one baseline, the requisite methods are QwtPlotCurve::setBrush() and QwtPlotCurve::setBaseline(). But how do I set two baselines?
    I think the problem in this thread Fill-area-above-baseline-and-below-the-curve is very similar. However from Qwt6 I see QwtPlotCurve::fillCurve() method as virtual. Can anyone suggest how to go ahead and add more than one baselines?

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,241
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fill area between two baselines(one at top, one at bottom.

    Quote Originally Posted by pkj View Post
    I intend to fill the area on curve between two lines(in my case horizontal).
    ??? - what do you want to do ?

    Uwe

  3. #3
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Fill area between two baselines(one at top, one at bottom.

    ??? - what do you want to do ?
    The variable I am trying to monitor is supposed to fluctuate between a High and Low value. Anything between High and Low is alright, higher than high and lower than low is not. So if I shade ok zone with green and not ok zone with red, it gives for easy identification.
    So, instead of shading the area between the baseline and curve, I have to shade area between a high line, curve and low line. Hope I make sense.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,241
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Fill area between two baselines(one at top, one at bottom.

    Quote Originally Posted by pkj View Post
    Anything between High and Low is alright, higher than high and lower than low is not. So if I shade ok zone with green and not ok zone with red, it gives for easy identification.
    So, instead of shading the area between the baseline and curve, I have to shade area between a high line, curve and low line. Hope I make sense.
    Sounds like you want to fill the area between high and low - the curve itsself doesn't matter.

    But what is high/low in your case:

    1. an fixed intervall y1->y2
    2. a corridor between 2 curves


    In case of 2 you can use QwtPlotIntervalCurve, in case of 1 see http://www.qtcentre.org/threads/4428...-on-a-Qwt-Plot.

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    pkj (7th September 2011)

Similar Threads

  1. Replies: 5
    Last Post: 17th December 2014, 12:07
  2. Replies: 10
    Last Post: 7th March 2012, 18:22
  3. Fill area of QPainterPath
    By vides2012 in forum Qt Programming
    Replies: 6
    Last Post: 17th June 2011, 13:00
  4. Replies: 6
    Last Post: 18th December 2008, 21:16
  5. Replies: 7
    Last Post: 15th November 2007, 17:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.