Ok, I'm going a little nutty here....
I want to use RenderableImage instead of Image for some things but am missing something because I can't seem to get the image to appear on screen.
In my constructor of the containing object I have:
Imageset* iset = ImagesetManager::getSingleton().getImageset( ImagesetName );
myImage.setImage( &iset->getImage( StaticImageName ) );
myImage.setPosition( Point( 0, 0 ) );
myImage.setHorzFormatting( RenderableImage::HorzStretched );
myImage.setVertFormatting( RenderableImage::VertStretched );
Then, in the drawSelf() funtion of the containing object I have:
Size sz = getSize();
myImage.setSize( sz );
Rect clipper( getPixelRect() );
Rect absrect(getUnclippedPixelRect());
Vector3 pos( absrect.d_left, absrect.d_top, z );
myImage.draw( pos, clipper );
And nothing shows up. I can simply change this to an Image (with the appropriate code) and it works as I'd expect. Any hints? (No errors in the log, btw, and all numbers look reasonable when inspected.)
Thanks,
Chris
using RenderableImage
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: using RenderableImage
Is the containing Window object using Relative or Absolute metrics? If Relative, then that's your problem - to fix, simply use the getAbsoluteSize() method instead of getSize() when setting the size of the RenderableImage. You probably already thought of this though
Your code looks good (you're basically doing the same as what is done in StaticImage), so if it's not the above I'll have to delve into things a little deeper tomorrow.
CE.

Your code looks good (you're basically doing the same as what is done in StaticImage), so if it's not the above I'll have to delve into things a little deeper tomorrow.
CE.
Re: using RenderableImage
<slapping forehead>DOH!
That's exactly what it was. Geeesh....
Thanks very much,
Chris

Thanks very much,
Chris
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: Bing [Bot] and 2 guests