本文整理汇总了C#中Cairo.RenderOuterShadow方法的典型用法代码示例。如果您正苦于以下问题:C# Cairo.RenderOuterShadow方法的具体用法?C# Cairo.RenderOuterShadow怎么用?C# Cairo.RenderOuterShadow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cairo
的用法示例。
在下文中一共展示了Cairo.RenderOuterShadow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderBackground
void RenderBackground (Cairo.Context context, Gdk.Rectangle region)
{
region.Inflate (-Padding, -Padding);
context.RenderOuterShadow (new Gdk.Rectangle (region.X + 10, region.Y + 15, region.Width - 20, region.Height - 15), Padding, 3, .25);
context.RoundedRectangle (region.X + 0.5, region.Y + 0.5, region.Width - 1, region.Height - 1, 5);
using (var lg = new LinearGradient (0, region.Y, 0, region.Bottom)) {
lg.AddColorStop (0, new Cairo.Color (.36, .53, .73));
lg.AddColorStop (1, new Cairo.Color (.21, .37, .54));
context.SetSource (lg);
context.FillPreserve ();
}
context.LineWidth = 1;
context.SetSourceRGB (.29, .47, .67);
context.Stroke ();
}
示例2: RenderBackground
void RenderBackground (Cairo.Context context, Gdk.Rectangle region)
{
region.Inflate (-Padding, -Padding);
context.RenderOuterShadow (new Gdk.Rectangle (region.X + 10, region.Y + 15, region.Width - 20, region.Height - 15), Padding, 3, .25);
context.RoundedRectangle (region.X + 0.5, region.Y + 0.5, region.Width - 1, region.Height - 1, 5);
using (var lg = new LinearGradient (0, region.Y, 0, region.Bottom)) {
lg.AddColorStop (0, new Cairo.Color (.36, .53, .73));
lg.AddColorStop (1, new Cairo.Color (.21, .37, .54));
context.Pattern = lg;
context.FillPreserve ();
}
context.Save ();
context.Translate (IconPosition.X, IconPosition.Y);
context.Scale (0.75, 0.75);
Gdk.CairoHelper.SetSourcePixbuf (context, starburst, -starburst.Width / 2, -starburst.Height / 2);
context.FillPreserve ();
context.Restore ();
context.LineWidth = 1;
context.Color = new Cairo.Color (.29, .47, .67);
context.Stroke ();
}