Results 1 to 2 of 2

Thread: Image effect with QPainter

  1. #1
    Join Date
    Jun 2011
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Image effect with QPainter

    Hi,

    I need to do a transition effect for images. the transition should be as follows:

    a small circle is drawn at the center of the first image. then this circle is expanded and within the circle will be drawn the second image. when the circle takes all screen, the transition ends and only the second image appears on the screen.

    I know that i should use QPainter::CompositionMode but i dont know how use it to reaches this effect.

    These three images help to understand the expected effect:
    Image1: http://postimage.org/image/2lvsk56ck/
    Image2: http://postimage.org/image/2lw7fzask/
    Transition1: http://postimage.org/image/2lwcelc9w/
    Transition2: http://postimage.org/image/2lwkoa2qs/

    Thanks

  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: Image effect with QPainter

    The effects Qt offers are not content related - that is, the content (in this case a circle) is nothing Qt can relate to.
    The effects are done on a whole image.
    So the expansion of the circle is something you will have to implement your self (but that is easy).
    If you combine that with alpha blending you can reach the effect you want.
    ==========================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.

Similar Threads

  1. Draw line on image using QPainter
    By Qt Coder in forum Qt Programming
    Replies: 29
    Last Post: 11th August 2015, 12:09
  2. How to apply the turnover effect to the image slideshow
    By Sirisha in forum Qt Programming
    Replies: 2
    Last Post: 22nd November 2011, 07:16
  3. i need extend image using QPainter
    By erichong81 in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2010, 08:51
  4. QPainter::setCompositingMode without effect
    By olidem in forum Qt Programming
    Replies: 4
    Last Post: 5th March 2009, 17:59
  5. Fading effect on QPainter fillrect()
    By smarinr in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2008, 21:57

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.