Results 1 to 3 of 3

Thread: QPen brush doesn't follow transformations

  1. #1
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QPen brush doesn't follow transformations

    Hello all, this is my first post here

    If I use a gradient brush to fill strokes, the gradient doesn't follow any transformation.

    For example:
    Qt Code:
    1. ...
    2. p->rotate(m_rotation);
    3. lg.setColorAt(1,Qt::transparent);
    4. lg.setColorAt(0,Qt::black);
    5. QPen gp = QPen(Qt::black, 20, Qt::SolidLine, Qt::SquareCap,Qt::RoundJoin);
    6. gp.setBrush(QBrush(lg));
    7. p->setPen(gp);
    8. p->drawRect(0,0,200,200);
    9. ...
    To copy to clipboard, switch view to plain text mode 

    Instead, it works correctly if I use gradients to fill shapes.

    Is this a bug or a feature?
    (I'm using qt 4.3)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPen brush doesn't follow transformations

    Could be a bug. Did you check the task tracker? Does the same happen if you use a pixmap instead of a gradient?

  3. The following user says thank you to wysota for this useful post:

    Mercurio (3rd July 2007)

  4. #3
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QPen brush doesn't follow transformations

    Thanks wysota, I found a similar bug on the task traker
    http://trolltech.com/developer/task-...ntry&id=129520

    btw using pixmaps there is the same problem.

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.