本文整理汇总了C#中Xwt.Drawing.Context.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# Context.Reset方法的具体用法?C# Context.Reset怎么用?C# Context.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Xwt.Drawing.Context
的用法示例。
在下文中一共展示了Context.Reset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: using
void ICanvasCellViewFrontend.Draw(object ctxBackend, Rectangle cellArea)
{
using (var ctx = new Context (ctxBackend, Toolkit.CurrentEngine)) {
ctx.Reset (null);
OnDraw (ctx, cellArea);
}
}
示例2: ImageBuilder
public ImageBuilder(double width, double height)
{
backend = new VectorContextBackend ();
ctx = new Context (backend, ToolkitEngine, vectorImageRecorderContextHandler);
ctx.Reset (null);
this.width = width;
this.height = height;
}
示例3: Draw
void Draw(object ctx, Rectangle bounds, ImageDescription idesc, Toolkit toolkit)
{
var c = new Context (ctx, toolkit);
if (idesc.Styles != StyleSet.Empty)
c.SetStyles (idesc.Styles);
c.Reset (null);
c.Save ();
c.GlobalAlpha = idesc.Alpha;
OnDraw (c, bounds);
c.Restore ();
}
示例4: ImageBuilder
public ImageBuilder(double width, double height)
{
backend = new VectorContextBackend (ToolkitEngine, width, height);
// Don't set the global styles to the context. The global styles will be used when rendering the image
ctx = new Context (backend, ToolkitEngine, ToolkitEngine.VectorImageRecorderContextHandler, false);
ctx.Reset (null);
this.width = width;
this.height = height;
}
示例5: OnDraw
public void OnDraw (object context, Rectangle dirtyRect)
{
Context ctx = null;
try {
ctx = new Context (context, ToolkitEngine);
ctx.Reset (Parent);
((Canvas)Parent).OnDraw (ctx, dirtyRect);
}
finally {
ctx.Dispose ();
}
}
示例6: Draw
void Draw (object ctx, Rectangle bounds)
{
var c = new Context (ctx, ToolkitEngine);
c.Reset (null);
OnDraw (c, bounds);
}