本文整理汇总了C#中Renderer.DrawLine方法的典型用法代码示例。如果您正苦于以下问题:C# Renderer.DrawLine方法的具体用法?C# Renderer.DrawLine怎么用?C# Renderer.DrawLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderer
的用法示例。
在下文中一共展示了Renderer.DrawLine方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public override void Render(Renderer renderer, bool selected)
{
renderer.PushPen();
renderer.Pen = SceneConstants.ManipPen;
renderer.FillCircle(this.PositionCircle);
if(selected && this.EnableRotate)
{
renderer.DrawLine(this.Position, this.AngleCircle.Center);
renderer.FillCircle(this.AngleCircle);
}
renderer.PopPen();
}
示例2: Render
public override void Render(Shape shape, Renderer renderer, bool selected)
{
if(this.Material != null)
{
Quad2f imageQuad = GetShapeQuad(shape);
renderer.DrawImage(this.Material, imageQuad);
if(selected)
{
renderer.PushPen();
renderer.Pen = SceneConstants.HighlightPen;
renderer.DrawLine(imageQuad.Vertices, true);
renderer.PopPen();
}
}
}
示例3: DrawBorderEllipse
private void DrawBorderEllipse(Renderer renderer)
{
if (BorderColor != Color)
for (int i = 1; i < ellipsePoints.Length; i++)
renderer.DrawLine(Center + ellipsePoints[i], Center + ellipsePoints[i - 1], BorderColor);
}
示例4: RenderGridLines
private void RenderGridLines(Renderer renderer, Vector2f p0, Vector2f p1, Vector2f dp, uint amount)
{
renderer.PushPen();
renderer.Pen = SceneConstants.GridPen;
for(uint index = 0; index < amount; ++index)
{
renderer.DrawLine(p0, p1);
p0 += dp;
p1 += dp;
}
renderer.PopPen();
}
示例5: Render
public override void Render(Shape shape, Renderer renderer, bool selected)
{
renderer.PushPen();
Pen pen = new Pen(shape.Color);
pen.Width = SceneConstants.PenWidth;
renderer.Pen = pen;
Quad2f quad = GetShapeQuad(shape);
renderer.DrawLine(quad.Vertices, true);
renderer.PopPen();
}