[英]multiple geometry clips on a UIElement
我正在使用Windows Phone 7的C#,Silverlight,Visual Studio。
有沒有辦法為UIElement
多個Geometry剪輯? 等同於:
Path myPath = new Path();
myPath.Data = myRectangle; // say of size 100x100
myPath.Clip = myClipRect; // smaller rectangle, say of size 20x20, located at (0,0)
myPath.Clip = myClipEllipse; // circle of radius 30, centered on myRectangle
現在,myClipEllipse將覆蓋myPath.Clip中的myClipRect,因此僅顯示myClipEllipse。 我正在尋找一個可以正確繪制這兩個剪輯的myRectangle的結果(即未反轉)。
我最終使用GeometryGroup
類( 這里的文檔 )解決了這個問題。 只需將所有幾何作為GeometryGroup
子代,然后將此GeometryGroup
給Clip。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.