[Qt-qml] Rounded Corner Clipping Support in Rectangle
Thomas Perl
th.perl at gmail.com
Wed Feb 2 01:01:22 CET 2011
Hi Bill,
2011/2/2 <Bill.Bonney at nokia.com>:
> Why can we not support rounded corners in Image element with clipping on. I
> realize it’s a performance hit, but if the image doesn’t change width and
> height the impact to animations could be minimal. It would be useful for
> some layouts we would like to achieve.
Depending on the background that is below the image you want to clip,
one obvious option would be to add a BorderImage on top of the
content, and make the BorderImage's content transparent except for the
corners (so that they overdraw what's below them). Of course, it
depends on what background image you have, but basically, this allows
you to emulate rounded corners (or any shape, basically) with an
"overlay" image + rectangular clipping.
HTH.
Thomas
More information about the Qt-qml
mailing list