Resize a Texture or an Image
Moderators: CEGUI MVP, CEGUI Team
Resize a Texture or an Image
I am using CEGUI with Ogre and I have an Ogre Texture that I use for RTT and I convert that to a CEGUI texture and use that to create a CEGUI::Image. I put that Image in a FrameWindow and I want the user to be able to resize that window, but I can't seem to find a way to change the size of the CEGUI::Texture or the CEGUI::Image. If I start out with an Ogre Texture that is the exact size of the window everything looks good, but when I resize the window it looks like crap because of the up- / down-sampling that is happening. What's the right way to do this?
I don't know anything about ogre textures and cegui textures and their interaction.
If you are displaying the image in a StaticImage widget (or a DefaultWindow), maybe you could take a look at the following two properties:
* VertFormatting
* HorzFormatting
witch both accept the following values:
* "LeftAligned" - Image is left aligned within the prescribed area.
* "CentreAligned" - Image is horizontally centred within the prescribed area.
* "RightAligned" - Image is right aligned within the prescribed area.
* "Stretched" - Image is horizontally stretched to fill the prescribed area.
* "Tiled" - Image is horizontally tiled to fill the prescribed area.
taken from the Falagard System XML Enumerations reference
Hope it helps.
If you are displaying the image in a StaticImage widget (or a DefaultWindow), maybe you could take a look at the following two properties:
* VertFormatting
* HorzFormatting
witch both accept the following values:
* "LeftAligned" - Image is left aligned within the prescribed area.
* "CentreAligned" - Image is horizontally centred within the prescribed area.
* "RightAligned" - Image is right aligned within the prescribed area.
* "Stretched" - Image is horizontally stretched to fill the prescribed area.
* "Tiled" - Image is horizontally tiled to fill the prescribed area.
taken from the Falagard System XML Enumerations reference
Hope it helps.
Who is online
Users browsing this forum: No registered users and 12 guests