本文整理汇总了C#中Cairo.ImageSurface.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ImageSurface.Show方法的具体用法?C# ImageSurface.Show怎么用?C# ImageSurface.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cairo.ImageSurface
的用法示例。
在下文中一共展示了ImageSurface.Show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: draw
static void draw (Cairo.Context gr, int width, int height)
{
int w, h;
ImageSurface image;
gr.Scale (width, height);
gr.LineWidth = 0.04;
gr.Arc (0.5, 0.5, 0.3, 0, 2*M_PI);
gr.Clip ();
gr.NewPath ();
image = new ImageSurface("data/e.png");
w = image.Width;
h = image.Height;
gr.Scale (1.0/w, 1.0/h);
image.Show (gr, 0, 0);
image.Destroy();
gr.Arc (0.5, 0.5, 0.3, 0, 2 * M_PI);
gr.Clip ();
gr.NewPath ();
gr.Rectangle (new PointD (0, 0), 1, 1);
gr.Fill ();
gr.Color = new Color (0, 1, 0, 1);
gr.MoveTo ( new PointD (0, 0) );
gr.LineTo ( new PointD (1, 1) );
gr.MoveTo ( new PointD (1, 0) );
gr.LineTo ( new PointD (0, 1) );
gr.Stroke ();
}
示例2: draw
static void draw (Cairo.Context gr, int width, int height)
{
int w, h;
ImageSurface image;
gr.Scale (width, height);
gr.LineWidth = 0.04;
image = new ImageSurface ("data/e.png");
w = image.Width;
h = image.Height;
gr.Translate (0.5, 0.5);
gr.Rotate (45* M_PI/180);
gr.Scale (1.0/w, 1.0/h);
gr.Translate (-0.5*w, -0.5*h);
image.Show (gr, 0, 0);
image.Destroy ();
}