本文整理匯總了C#中gbrainy.Core.Main.CairoContextEx.SetDash方法的典型用法代碼示例。如果您正苦於以下問題:C# CairoContextEx.SetDash方法的具體用法?C# CairoContextEx.SetDash怎麽用?C# CairoContextEx.SetDash使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gbrainy.Core.Main.CairoContextEx
的用法示例。
在下文中一共展示了CairoContextEx.SetDash方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
#if DESIGN_MODE
gr.Save ();
gr.Color = new Cairo.Color (1, 0, 0);
gr.Rectangle (0, 0, Width, Height);
gr.Stroke ();
gr.Restore ();
#endif
if (hoover == true)
{
double lw = gr.LineWidth;
double [] dashes = {0.01, /* ink */
0.01, /* skip */ };
gr.Save ();
gr.Color = new Cairo.Color (0.5, 0.5, 0.5, 1);
gr.SetDash (dashes, 0);
if (SelectedArea.Width == 0 && SelectedArea.Height == 0)
gr.Rectangle (-lw, -lw, Width + lw * 2, Height + lw * 2);
else
gr.Rectangle (SelectedArea.X -lw, SelectedArea.Y -lw, SelectedArea.Width + lw * 2, SelectedArea.Height + lw * 2);
gr.Stroke ();
gr.Restore ();
}
if (DrawEventHandler == null)
return;
DrawEventHandler (this, new DrawEventArgs (gr, Width, Height, rtl, Data));
}