Clip a stretched image.

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

makofierce
Just popping in
Just popping in
Posts: 12
Joined: Mon Aug 16, 2010 02:02

Clip a stretched image.

Postby makofierce » Wed Jul 13, 2011 17:05

How do you clip a stretched image? (using scale values, no absolutes)

Doesn't seem to be a way to both stretch and clip, or to stretch tiled images and then clip them...

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Clip a stretched image.

Postby Jamarr » Wed Jul 13, 2011 18:47

It is difficult to answer your question since you provided so little information. No screen shots, no layout-xml, no code, no log / version info, no mention of the widgets you are using, etc. So until you provide more information the only thing I can really suggest is to look into the ClippedByParent window property.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

makofierce
Just popping in
Just popping in
Posts: 12
Joined: Mon Aug 16, 2010 02:02

Re: Clip a stretched image.

Postby makofierce » Thu Jul 14, 2011 15:51

In the looknfeel file only. The XOR question was also about the looknfeel file.

So:
1) Stretch an image. (left, top, width, height) <-- "Stretched" property.
2) Clip the stretched image. (left, top, width, height) <-- can't be done?

makofierce
Just popping in
Just popping in
Posts: 12
Joined: Mon Aug 16, 2010 02:02

Re: Clip a stretched image.

Postby makofierce » Mon Jul 25, 2011 05:00

Is that not understandable?

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Clip a stretched image.

Postby Jamarr » Mon Jul 25, 2011 18:11

I think I understand, although some pictures would certainly clarify the matter.

I do not think the xml scheme supports any explicit widget clipping elements or attributes. However, I am pretty sure that you can fake this with a custom widget such that it is composed of two widgets 1) a parent container window which will be used to clip the child window and 2) a child window without scrollbars and ClippedByParent enabled. You can think use the PropertyLinkDefinition elements to make the child-properties (like size/scale) available as a property of the composite/parent widget. You may even be able to adopt an existing composite widget like ScrollablePane by simply tweaking the definition to suit your needs.

As I am no expert on the xml-scheme I cannot give a concrete example. I do think this is possible with a little R&D put in.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

makofierce
Just popping in
Just popping in
Posts: 12
Joined: Mon Aug 16, 2010 02:02

Re: Clip a stretched image.

Postby makofierce » Tue Jul 26, 2011 18:15

I'll try, thanks.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests