【发布时间】:2021-06-14 09:06:24
【问题描述】:
我正在尝试使用带圆角的Visual。这是我的代码:
auto clip = compositor->CreateGeometricClip();
auto roundedRectangle = compositor->CreateRoundedRectangleGeometry();
roundedRectangle->Size = Windows::Foundation::Numerics::float2(width, height);
roundedRectangle->CornerRadius = Windows::Foundation::Numerics::float2(10, 10);
clip->Geometry = roundedRectangle;
visual->Clip = clip;
这可行,但这会在视觉对象的所有 4 个角上创建圆角。是否可以使用Composition API 来实现我的目标?作为参考,这是我希望最终结果的样子。
而不是我现在拥有的
【问题讨论】: