On 14 July 2011 02:52, SYSE | Edvin <e...@syse.no> wrote: > Den 13.07.2011 21:45, skrev Greg Brown: >> >> If the clip area is specified on ImageView, I think it would be possible >> to support the renderer case by just adding another property to the content >> classes that specifies the clip area. The renderer would just pass this >> along to the ImageView: >> >> <ButtonData text="foo" icon="@bar.png" iconBounds="{x:0, y:0 ,width:32, >> height:32}"/> >> >> If not specified (null), the bounds would default to the image size. > > That's VERY nice :)) >
The same syntax could also be used to support a clip area on an Image/Picture. Instead of the iconBounds data being passed on to an ImageView, it would instead be passed on the Image/Picture that ButtonData uses internally. So this would be ... <ButtonData text="foo" icon="@bar.png" iconBounds="{x:0, y:0 ,width:32, height:32}"/> ... the equivalent of this <ButtonData text="foo"> <icon> <Image image="@bar.png" iconBounds="{x:0, y:0 ,width:32, height:32}"/> </icon> <ButtonData> I'm just thinking about the use of ImageViews and Images/Pictures and if there are cases where this same functionality would be useful for an Image/Picture, but when an ImageView is not involved. A quick search through the source seems to suggest that Images/Pictures are rarely used when an ImageView is not involved, so it is probably not a big deal.