WinRT中的路径剪辑? [英] Path clipping in WinRT?

查看:102
本文介绍了WinRT中的路径剪辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一种浴室秤。我有顶部的玻璃,针和刻度线。在下面,我有一个大圆圈,边缘周围印有数字。然后用户通过拖动他们的手指来操纵。
问题是我不知道如何隐藏通过玻璃窗格看不到的圆形部分(这是一个奇怪的形状,而不是矩形),但剪辑只接受RectangleGeometry。如何在WPF中使用路径进行剪切?

I am designing a sort of bathroom scale. I have the top piece which is the glass and the needle and the tick marks. Underneath that I have a large circle with the numbers printed around the edge. The user then manipulates by dragging their finger. The problem is I do not know how to hide the parts of the circle that are not visible through the glass pane(which is an odd shape, not rectangular) yet the clipping only accepts a RectangleGeometry. How can I use a path for clipping like in WPF?

推荐答案

没有路径剪切功能,但您可以获得通过将顶部部分创建为具有透明玻璃部分的位图来实现类似的效果。

There is no path clipping functionality, but you may be able to get a similar effect by creating the top piece as a bitmap with a transparent section for the glass.

- Rogb


这篇关于WinRT中的路径剪辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆