Resize a Texture or an Image

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

CaseyB
Just popping in
Just popping in
Posts: 7
Joined: Thu Jun 08, 2006 04:24

Resize a Texture or an Image

Postby CaseyB » Thu May 03, 2007 21:49

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?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu May 03, 2007 21:54

sorry, what is the exact result you want to have ?

CaseyB
Just popping in
Just popping in
Posts: 7
Joined: Thu Jun 08, 2006 04:24

Postby CaseyB » Thu May 03, 2007 22:02

I want the user to be able to resize the window without the render texture becoming either pixelated or losing resolution due to down-sampling. Basically I want my Ogre::Texture, CEGUI::Texture and CEGUI::Image to always match the size of the FrameWindow.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu May 03, 2007 22:47

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.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Fri May 04, 2007 20:45

Bump!!

Other ideas on how to solve this?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests