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...
Clip a stretched image.
Moderators: CEGUI MVP, CEGUI Team
Re: Clip a stretched image.
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!
-
- Just popping in
- Posts: 12
- Joined: Mon Aug 16, 2010 02:02
Re: Clip a stretched image.
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?
So:
1) Stretch an image. (left, top, width, height) <-- "Stretched" property.
2) Clip the stretched image. (left, top, width, height) <-- can't be done?
-
- Just popping in
- Posts: 12
- Joined: Mon Aug 16, 2010 02:02
Re: Clip a stretched image.
Is that not understandable?
Re: Clip a stretched image.
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.
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!
-
- Just popping in
- Posts: 12
- Joined: Mon Aug 16, 2010 02:02
Re: Clip a stretched image.
I'll try, thanks.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 8 guests