Results 1 to 2 of 2

Thread: about image operation:bitblt

  1. #1
    Join Date
    May 2006
    Posts
    32
    Thanks
    15
    Thanked 2 Times in 2 Posts

    Default about image operation:bitblt

    Hi,folks:

    I QT4,We can use QLabel::setPixmap to render an image.

    Can I use windows raw api bitblt to draw the image?How?
    what's the difference(in efficiency),then

    typeproto:
    Qt Code:
    1. BOOL BitBlt(
    2. HDC hdcDest, // handle to destination DC
    3. int nXDest, // x-coord of destination upper-left corner
    4. int nYDest, // y-coord of destination upper-left corner
    5. int nWidth, // width of destination rectangle
    6. int nHeight, // height of destination rectangle
    7. HDC hdcSrc, // handle to source DC
    8. int nXSrc, // x-coordinate of source upper-left corner
    9. int nYSrc, // y-coordinate of source upper-left corner
    10. DWORD dwRop // raster operation code
    11. );
    To copy to clipboard, switch view to plain text mode 


    I think the KEY is how get the coordinate "hdcDest"


    Any advice will be appreciated.

    Thanks in advance.

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

    Default Re: about image operation:bitblt

    If you're using Qt3, you can use bitBlt from Qt. If you're using Qt4 I don't think you should use native WinAPI calls to do the drawing, because Qt uses a backing store and this would probably ruin it.

    Maybe you should just try to improve the efficiency of the rendering itself? For example by making as less conversions between classes as possible (especially QImage <=> QPixmap).

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

    iGoo (2nd June 2006)

Similar Threads

  1. problem with the back ground image
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2006, 21:34
  2. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36
  3. .gif and .tiff image type in QListView in QT3.3.5
    By darpan in forum Qt Programming
    Replies: 5
    Last Post: 18th March 2006, 04:31
  4. Question about updating an image on screen
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 19:01
  5. reading in image from 24bit char*
    By cbeall1 in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2006, 00:09

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.