Results 1 to 3 of 3

Thread: How to draw strokepath

  1. #1
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default How to draw strokepath

    Hello,

    I am trying to implement this following gdi call in Qt.
    Qt Code:
    1. CDC* m_pDC;
    2. m_pDC->BeginPath();
    3. m_pDC->PolyDraw(points, types, count);
    4. m_pDC->EndPath();
    5. m_pDC->StrokePath();
    To copy to clipboard, switch view to plain text mode 

    Need Help in making equivalent calls in Qt.

    Regards,
    Raj
    Last edited by wysota; 1st April 2011 at 20:17.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to draw strokepath

    Have a look at QPainter.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to draw strokepath

    Thanks, QPainter works for me ...
    I create a QPainterPath and then strokepath using QPainter
    e.g. painter->strokePath(path,pen)

    Only thing I have to take care of is: all the MOVETO, LINETO, CLOSEFIGURE stuff ...

Similar Threads

  1. Qwt Scale Draw
    By maxpayne in forum Qwt
    Replies: 2
    Last Post: 6th June 2012, 13:01
  2. Replies: 10
    Last Post: 10th February 2011, 23:31
  3. How can i draw on desktop?
    By Keigo in forum General Programming
    Replies: 9
    Last Post: 11th October 2010, 08:23
  4. How to draw a arc
    By ProTonS in forum Qt Programming
    Replies: 3
    Last Post: 9th September 2009, 15:41
  5. Draw on a QTableWidget
    By Corran in forum Qt Programming
    Replies: 6
    Last Post: 6th January 2006, 22:17

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.