Results 1 to 3 of 3

Thread: QwtPlotCurve shift by 1 pixel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default QwtPlotCurve shift by 1 pixel

    Hello!

    How can I shift curve by 1 pixel?

    I try to do in this way, but this doesn't help: I have QVector<QPointF> and than I do smth like:

    Qt Code:
    1. for (int i = 0; i < sample.size(); i++) {
    2. tmp = samples.at(i);
    3.  
    4. newVector.append(tmp.x, tmp.y - 1);
    5. }
    6. setSamples(newVector);
    To copy to clipboard, switch view to plain text mode 

    tmp there is struct like:
    struct {
    double x;
    double y;
    }

    Problem is that scale is to big: 0 - 8*10^8
    and when curves have same value i need some value shift down by 1 pixel...
    Last edited by carhun; 20th August 2012 at 10:25.

Similar Threads

  1. Replies: 1
    Last Post: 11th May 2012, 08:02
  2. Replies: 2
    Last Post: 16th February 2012, 23:10
  3. shift + key
    By jajdoo in forum Newbie
    Replies: 5
    Last Post: 22nd July 2010, 18:25
  4. QPen color shift
    By Alberto in forum Qt Programming
    Replies: 0
    Last Post: 22nd October 2008, 11:35
  5. QPixmap pixel by pixel ?
    By tommy in forum Qt Programming
    Replies: 19
    Last Post: 3rd December 2007, 22:52

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.