本文整理汇总了C#中Surface.DrawLine方法的典型用法代码示例。如果您正苦于以下问题:C# Surface.DrawLine方法的具体用法?C# Surface.DrawLine怎么用?C# Surface.DrawLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Surface
的用法示例。
在下文中一共展示了Surface.DrawLine方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public void Draw(Surface surface)
{
if (age == -1)
return;
int x = (int) position.X;
int y = (int) position.Y;
surface.DrawLine(x, y, x + 1, y);
surface.DrawLine(x, y + 1, x + 1, y + 1);
}
示例2: Draw
public void Draw(Surface surface)
{
if (!visible)
return;
surface.DrawLine(end1.X + offset.X, end1.Y + offset.Y,
end2.X + offset.X, end2.Y + offset.Y);
}
示例3: Draw
public void Draw(Surface surface)
{
int dimLine = Constants.random.Next(NumLines);
for (int i = 0; i < NumLines; i++) {
if (i == dimLine)
surface.ForeColor = Color.FromArgb(0,170,170);
else
surface.ForeColor = Color.Yellow;
surface.DrawLine(ends[i].X, ends[i].Y,
ends[i + NumLines].X, ends[i + NumLines].Y);
}
}
示例4: Draw
public void Draw(Surface surface)
{
surface.DrawLine(location.X, location.Y, location.X + 1, location.Y + 1);
}
示例5: Draw
public void Draw(Surface surface)
{
surface.DrawLine(end1.X, end1.Y, end2.X, end2.Y);
}