PDA

View Full Version : setTiles() func of QCanvas



Kapil
24th March 2006, 04:05
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

wysota
25th March 2006, 19:13
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.