Results 1 to 2 of 2

Thread: setTiles() func of QCanvas

  1. #1
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default setTiles() func of QCanvas

    Hi,

    I went through the setTile() function of the QCanvas but am confused with one concept.. It creates h tiles horzontally and v tiles vertically with the Pixmap p...
    If i want to set different Pixmaps for different Tiles, then i need to define an array of Pixmaps which would do that... but setTiles() function does not provide that and only allows us to place a single Pixmap repeatedly on different Tiles..

    I couldnot understand the functionality of it.. could anyone please tell me how to place different Pixmaps on seperate tiles using setTile function...

    Thanking you,
    Kapil

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: setTiles() func of QCanvas

    This pixmap can consist of more than one tile. The reference for QCanvas::setTiles() has a picture of the situation. If the pixmap has 100 pixels in width and 30 pixels in height and you set tilewidth and tileheight to 10, then it means that the pixmap holds 3 rows of 10 tiles each (10x3) = 30 tiles which form a pattern which will be repeated just like the background of web pages.

Similar Threads

  1. Replies: 7
    Last Post: 20th March 2006, 20:03

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.