本文整理汇总了C#中RndfEditor.Display.Utilities.WorldTransform.ShouldDraw方法的典型用法代码示例。如果您正苦于以下问题:C# WorldTransform.ShouldDraw方法的具体用法?C# WorldTransform.ShouldDraw怎么用?C# WorldTransform.ShouldDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RndfEditor.Display.Utilities.WorldTransform
的用法示例。
在下文中一共展示了WorldTransform.ShouldDraw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public void Render(System.Drawing.Graphics g, WorldTransform t)
{
//if (t.WorldLowerLeft.X < this.Position.X && t.WorldLowerLeft.Y < this.position.Y && t.WorldUpperRight.X > this.position.X && t.WorldUpperRight.Y > this.position.Y)
if (t.ShouldDraw(this.GetBoundingBox(t)))
{
Color c;
if (this.isCheckpoint && this.IsStop)
{
c = DrawingUtility.ColorArbiterWaypointStopCheckpoint;
}
else if (this.isCheckpoint)
{
c = DrawingUtility.ColorArbiterWaypointCheckpoint;
}
else if (this.IsStop)
{
c = DrawingUtility.ColorArbiterWaypointStop;
}
else
{
c = DrawingUtility.ColorArbiterWaypoint;
}
if (this.isCheckpoint && DrawingUtility.DisplayArbiterWaypointCheckpointId)
{
DrawingUtility.DrawControlPoint(this.position, DrawingUtility.ColorDisplayArbiterCheckpoint, this.checkpointId.ToString(),
ContentAlignment.TopCenter, ControlPointStyle.SmallCircle, g, t);
}
if (DrawingUtility.DisplayArbiterWaypointId)
{
DrawingUtility.DrawControlPoint(this.position, c, this.WaypointId.ToString(),
ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
}
else
{
DrawingUtility.DrawControlPoint(this.position, c, null,
ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
}
}
}
示例2: Render
public void Render(System.Drawing.Graphics g, WorldTransform t)
{
//if ((t.WorldLowerLeft.X < this.Final.Position.X && t.WorldLowerLeft.Y < this.Final.Position.Y && t.WorldUpperRight.X > this.Final.Position.X && t.WorldUpperRight.Y > this.Final.Position.Y) ||
// (t.WorldLowerLeft.X < this.Initial.Position.X && t.WorldLowerLeft.Y < this.Initial.Position.Y && t.WorldUpperRight.X > this.Initial.Position.X && t.WorldUpperRight.Y > this.Initial.Position.Y))
if(t.ShouldDraw(this.GetBoundingBox(t)))
{
Color c;
if (DrawingUtility.DrawArbiterLanePartitionWays && this.Lane.Way.WayId.Number == 1)
{
c = DrawingUtility.ColorArbiterLanePartitionWay1;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Solid,
this.Initial.Position, this.Final.Position, g, t);
}
else if (DrawingUtility.DrawArbiterLanePartitionWays && this.Lane.Way.WayId.Number == 2)
{
c = DrawingUtility.ColorArbiterLanePartitionWay2;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Solid,
this.Initial.Position, this.Final.Position, g, t);
}
else if (this.selected == SelectionType.SingleSelected)
{
c = Color.Red;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Solid,
this.Initial.Position, this.Final.Position, g, t);
}
else
{
if (this.Type == PartitionType.Normal)
{
c = DrawingUtility.ColorArbiterLanePartitionDefault;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Solid,
this.Initial.Position, this.Final.Position, g, t);
}
else if (this.Type == PartitionType.Sparse)
{
c = Color.Black;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Dash,
this.Initial.Position, this.Final.Position, g, t);
}
else
{
c = Color.DarkOrange;
DrawingUtility.DrawColoredControlLine(c, System.Drawing.Drawing2D.DashStyle.Dot,
this.Initial.Position, this.Final.Position, g, t);
}
}
}
}