Page 1 of 1

Image sizes

Posted: Tue Dec 26, 2006 10:05 am
by Xharock
OK So I know I can't use textures that are not a square size i.e. 512 x 512 etc. So what if I want to display a logo which is 500 x 200 or something short of splitting it up into several square textures? I'm using IGUIImage to display 2D images on the screen.

Posted: Tue Dec 26, 2006 1:54 pm
by jAyTeA
you can use textures which aren't square size!! But they should have power of two width and height. i.e. you can use a 512x256 pixel Image for your logo.

Posted: Tue Dec 26, 2006 2:32 pm
by Acki
Or you use an image (not IGUIImage) !!!
There is no restriction with the size (can have any size you want since V1.2) !!!
And you can just get an area out of the image (no need to draw the full image) !!!
You should have a look at tutorial #6.2DGraphics for this...

Posted: Tue Dec 26, 2006 9:26 pm
by Xharock
I'll try making my logo Image a size that is a power of 2. How can I tell IGUIImage to only display part of it?

Posted: Tue Dec 26, 2006 10:44 pm
by Acki
You can't do that with an IGUIImage !!!
have a look for draw2DImage(...), I think hat's what you need... ;)

Posted: Tue Dec 26, 2006 11:11 pm
by bitplane
you can, just use setPosition to set a new rectangle for the GUIImage, the parts you don't want to see will (should!) be clipped away.
if you want to change the position of the top left corner in the source image, then Acki is right, you can't do that with gui images