本文整理汇总了C#中Point.ToPointF方法的典型用法代码示例。如果您正苦于以下问题:C# Point.ToPointF方法的具体用法?C# Point.ToPointF怎么用?C# Point.ToPointF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point
的用法示例。
在下文中一共展示了Point.ToPointF方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Move
public void Move(Point pPoint)
{
PointF delta = pPoint.ToPointF().Subtract(m_startDrag);
m_window.SetZoom(m_window.magnification + delta.X / 300f, true);
m_startDrag = pPoint.ToPointF();
}
示例2: PixelToPoint
public PointF PixelToPoint(Point pixel)
{
if (DrawLimits.IsNaN())
return PointF_Extension.NaN;
else
{
Matrix transform = Transform;
PointF[] points = new PointF[] { pixel.ToPointF() };
transform.Invert();
transform.TransformPoints(points);
return points[0];
}
}
示例3: Begin
public void Begin(Point pPoint)
{
m_startDrag = pPoint.ToPointF();
}
示例4: drawArc
private void drawArc(Graphics graphics, Pen pen, Pen arrowPen, Point a, Point b)
{
const decimal f = 0.05m;
Point c = new Point((a.X + b.X) / 2m + f * (b.Y - a.Y), (a.Y + b.Y) / 2m - f * (b.X - a.X));
double angle = Math.Atan2((double)(b.Y - c.Y), (double)(b.X - c.X));
Point d = new Point(b.X - 10 * (decimal)Math.Cos(angle), b.Y - 10 * (decimal)Math.Sin(angle));
graphics.DrawCurve(pen, new PointF[] { a.ToPointF(), c.ToPointF(), b.ToPointF() }, 1f);
graphics.DrawLine(arrowPen, d.ToPointF(), b.ToPointF());
}