Hi, I would like to display an image on my GUI. The image is not the correct size all of the time. Is there a way that I can draw this image resized to fit the dimensions i need? The image size is variable so making copies of the 2d image is not an option.
Thanks much,
sevans
resizing a 2D Image
If you are using IVideoDriver::draw2DImage, it has a version that takes a destRect. You can make that destination rect be any size, and it will be scaled to fit.
Code: Select all
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
video::SColor* colors=0, bool useAlphaChannelOfTexture=false) = 0;
JeffM2501