Results 1 to 5 of 5

Thread: Painter: transform coordinates but not pen width settings

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Painter: transform coordinates but not pen width settings

    First, a pen of width 0 is always drawn at the same (1-pixel) width.

    Second, you could apply the transform to the painter, then apply its inverse to the pen. Not exactly sure how to proceed with that idea, but the basic idea is to scale the pen width back to what it started out as.

    ---------------

    Or, simply store the "fixed" pen size, apply the transform to the painter, then set the pen width to the stored value.
    Last edited by SixDegrees; 12th April 2011 at 22:42.

Similar Threads

  1. Replies: 4
    Last Post: 18th March 2010, 10:11
  2. QToolBox width fixed to maximum content width
    By ghorwin in forum Qt Programming
    Replies: 0
    Last Post: 10th July 2009, 09:58
  3. Replies: 6
    Last Post: 14th April 2009, 17:40
  4. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 20:51
  5. Changing painter settings for QPixmap
    By spagatoni in forum Newbie
    Replies: 7
    Last Post: 22nd October 2008, 16:41

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
  •  
Qt is a trademark of The Qt Company.