本文整理汇总了C#中Curve.GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Curve.GetPoint方法的具体用法?C# Curve.GetPoint怎么用?C# Curve.GetPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curve
的用法示例。
在下文中一共展示了Curve.GetPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CurveWidget
public CurveWidget(Curve _curve)
: base()
{
PixelsPerUnit = 300;
CanvasRect rect = new CanvasRect(Root());
rect.X1 = 0;
rect.Y1 = 0;
rect.X2 = 1;
rect.Y2 = 1;
rect.FillColor = "white";
rect.OutlineColor = null;
rect.WidthUnits = 0.0;
CenterScrollRegion = true;
SetScrollRegion(0.0, 0.0, 1.0, 1.0);
curve = _curve;
bpath = new MyBPath(Root());
bpath.WidthPixels = 0;
bpath.OutlineColor = "blue";
MakeLine(0,0.25, 1,0.25);
MakeLine(0,0.5, 1,0.5);
MakeLine(0,0.75, 1,0.75);
MakeLine(0.25,0, 0.25,1);
MakeLine(0.5,0, 0.5,1);
MakeLine(0.75,0, 0.75,1);
points = new ArrayList();
for (uint i = 0; i < curve.NumPoints(); ++i) {
float x, y;
curve.GetPoint (i, out x, out y);
points.Add (new CurvePoint(x, y, this));
}
bpath.SetPathDef(MakePathDef());
marker = new CurveMarker(0, 0, this, "dark grey");
marker.Active = false;
ButtonPressEvent += new ButtonPressEventHandler(OnButtonPress);
}