Page 1 of 1

Clip a stretched image.

Posted: Wed Jul 13, 2011 17:05
by makofierce
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...

Re: Clip a stretched image.

Posted: Wed Jul 13, 2011 18:47
by Jamarr
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.

Re: Clip a stretched image.

Posted: Thu Jul 14, 2011 15:51
by makofierce
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?

Re: Clip a stretched image.

Posted: Mon Jul 25, 2011 05:00
by makofierce
Is that not understandable?

Re: Clip a stretched image.

Posted: Mon Jul 25, 2011 18:11
by Jamarr
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.

Re: Clip a stretched image.

Posted: Tue Jul 26, 2011 18:15
by makofierce
I'll try, thanks.