PandaChuZero
Topic Author
Posts: 11
Joined: 06 May 2014, 06:05

Is clipping mask supported?

07 May 2014, 03:50

One more question,

Is clipping mask supported for organic or non linear shapes. And can the mask be altered at runtime for closing window effects and such.

For example as seen in this tutorial ?

https://www.youtube.com/watch?v=lcDFQ5cfJe4#t=115

Thanks!
 
User avatar
sfernandez
Site Admin
Posts: 3154
Joined: 22 Dec 2011, 19:20

Re: Is clipping mask supported?

07 May 2014, 12:44

Hi,

You can apply any clip geometry to the Clip property of all UI elements. For example:
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Rectangle Width="400" Height="200" Fill="Red">
        <Rectangle.Clip>
            <RectangleGeometry Rect="10,10,180,180" RadiusX="20" RadiusY="20"/>
        </Rectangle.Clip>
    </Rectangle>
    <Rectangle Width="400" Height="200" Fill="Green"
        Clip="M300,0L320,80 400,100 320,120 300,200 280,120 200,100 280,80z"/>
</Grid>
Resulting in the following render:
clip-paths.png
clip-paths.png (3.01 KiB) Viewed 2314 times

Who is online

Users browsing this forum: No registered users and 2 guests