本文整理汇总了C#中Point.Minus方法的典型用法代码示例。如果您正苦于以下问题:C# Point.Minus方法的具体用法?C# Point.Minus怎么用?C# Point.Minus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point
的用法示例。
在下文中一共展示了Point.Minus方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoveToCore
public override void MoveToCore(Point newPosition)
{
Offset = newPosition.Minus(Origin);
base.MoveToCore(newPosition);
}
示例2: MouseMove
internal void MouseMove(Point point)
{
if (state == CanvasState.Dragging)
{
Point d = point.Minus(draggingOrigin);
Point p1 = allViews[dragged];
Point p2 = p1.Offseted(d);
Size sz = dragged.Assemble().Size;
Rectangle inva = Rectangle.Union(new Rectangle(p1, sz), new Rectangle(p2, sz));
inva.Inflate(5, 5);
draggedModel.Location = p2;
draggingOrigin = point;
DropRegion active;
if (FindActiveDropRegion(ViewBounds(dragged), out active))
{
Rectangle topLevelDest = ViewBounds(active.Destination.AbsoluteAncestor());
inva = Rectangle.Union(inva, topLevelDest);
}
Update(inva);
}
if (state == CanvasState.Ready)
{
/*
IBlockView hit = HitTest(point);
if (hit != null)
canvasView.status = hit.ToString();
else
canvasView.status = "<None>";
//*/
}
}
示例3: MoveToCore
public override void MoveToCore(Point newPosition)
{
Point newOffset = newPosition.Minus(Point(0));
newOffset = newOffset.TrimToMaxLength(ToLogical(100));
Offset = newOffset;
base.MoveToCore(newPosition);
}
示例4: MoveToCore
public override void MoveToCore(Point newPosition)
{
Point newOffset = newPosition.Minus(Point(0));
Offset = newOffset;
base.MoveToCore(newPosition);
}
示例5: CartesianToPolar
public static void CartesianToPolar(Point point, Point center, out double radius, out double phi)
{
var p = point.Minus(center);
radius = Math.Sqrt((p.X * p.X) + (p.Y * p.Y));
phi = Math.Atan2(p.Y, p.X);
}