Geometry
对象提供了绘制和操纵几何图形的方法。是的
CreatePolygon
CreatePath
对于发光效果,你可以参考这个
code sample
private void DoEffect(CanvasDrawingSession ds, Size size, float amount)
{
size.Width = size.Width - ExpandAmount;
size.Height = size.Height - ExpandAmount;
var offset = (float)(ExpandAmount / 2);
using (var textLayout = CreateTextLayout(ds, size))
using (var textCommandList = new CanvasCommandList(ds))
{
using (var textDs = textCommandList.CreateDrawingSession())
{
textDs.DrawTextLayout(textLayout, 0, 0, GlowColor);
}
glowEffectGraph.Setup(textCommandList, amount);
ds.DrawImage(glowEffectGraph.Output, offset, offset);
ds.DrawTextLayout(textLayout, offset, offset, TextColor);
}
}