本文整理汇总了C#中RndfEditor.Display.Utilities.WorldTransform.GetWorldPoint方法的典型用法代码示例。如果您正苦于以下问题:C# WorldTransform.GetWorldPoint方法的具体用法?C# WorldTransform.GetWorldPoint怎么用?C# WorldTransform.GetWorldPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RndfEditor.Display.Utilities.WorldTransform
的用法示例。
在下文中一共展示了WorldTransform.GetWorldPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
/// <summary>
/// Renders the lane splint
/// </summary>
/// <param name="g"></param>
/// <param name="t"></param>
/// <remarks>TODO: set lane spline</remarks>
public void Render(System.Drawing.Graphics g, WorldTransform t)
{
Color c = DrawingUtility.ColorArbiterLaneSpline;
if (DrawingUtility.DisplayArbiterLanes)
{
Coordinates cp = t.GetWorldPoint(new PointF(t.ScreenSize.Width/2, t.ScreenSize.Height/2));
Coordinates lp = this.LanePath().GetClosestPoint(cp).Location;
string s = this.LaneId.ToString();
DrawingUtility.DrawControlLabel(lp, Color.DarkBlue, s, ContentAlignment.MiddleCenter, ControlPointStyle.None, g, t);
}
bool displayPolygon = false;
switch (this.LaneId.Number)
{
case 1:
displayPolygon = DrawingUtility.DisplayArbiterLanePolygon1;
break;
case 2:
displayPolygon = DrawingUtility.DisplayArbiterLanePolygon2;
break;
case 3:
displayPolygon = DrawingUtility.DisplayArbiterLanePolygon3;
break;
case 4:
displayPolygon = DrawingUtility.DisplayArbiterLanePolygon4;
break;
}
if (displayPolygon && this.LanePolygon != null)
{
// show intersection polygon
HatchBrush hBrush1 = new HatchBrush(HatchStyle.ForwardDiagonal, DrawingUtility.ColorArbiterLanePolygon, Color.White);
// populate polygon
List<PointF> polyPoints = new List<PointF>();
foreach (Coordinates lpp in this.LanePolygon.points)
{
polyPoints.Add(DrawingUtility.ToPointF(lpp));
}
// draw poly and fill
g.FillPolygon(hBrush1, polyPoints.ToArray());
DrawingUtility.DrawControlPolygon(this.LanePolygon, DrawingUtility.ColorArbiterLanePolygon, System.Drawing.Drawing2D.DashStyle.Solid, g, t);
}
if(DrawingUtility.DisplayArbiterLanePath)
{
DrawingUtility.DrawControlLine(this.laneLinePath, g, t, new Pen(Color.MediumVioletRed), Color.MediumVioletRed);
}
}