本文整理汇总了C#中System.Drawing.Point.ToMap方法的典型用法代码示例。如果您正苦于以下问题:C# Point.ToMap方法的具体用法?C# Point.ToMap怎么用?C# Point.ToMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Point
的用法示例。
在下文中一共展示了Point.ToMap方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadColor
private void ReadColor(Point p)
{
if (Target != null && Target.IsReady)
{
ColorHolder = Target.ReadPixel(p.ToMap(Target.GridWidth));
}
}
示例2: OnMove
protected override void OnMove(Point p)
{
base.OnMove(p);
if (Target != null && Target.IsReady)
{
DrawPoints.Add(p.ToMap(Target.GridWidth));
}
}
示例3: OnBegin
protected override void OnBegin(Point p)
{
base.OnBegin(p);
if(Target != null && Target.IsReady)
{
BeginPoint = p.ToMap(Target.GridWidth);
}
}
示例4: OnEnd
protected override bool OnEnd(Point p)
{
base.OnEnd(p);
if (Target != null && Target.IsReady)
{
DrawPoints.Add(p.ToMap(Target.GridWidth));
}
return false;
}
示例5: OnBegin
protected override void OnBegin(Point p)
{
base.OnBegin(p);
if (Target.IsReady)
{
LastPoint = p.ToMap(Target.GridWidth);
DrawPoints.Add(LastPoint);
}
}
示例6: OnMove
protected override void OnMove(Point p)
{
base.OnMove(p);
if(Target != null && ColorHolder != null && Target.IsReady)
{
Target.UpdateDrawable();
var points = new Dictionary<Point, Color>();
GenericDraw.Line(BeginPoint, p.ToMap(Target.GridWidth), ColorHolder, points);
Target.FakeDrawPixel(points.GetDistributionColor(Target, Width));
}
}
示例7: OnMove
protected override void OnMove(Point p)
{
base.OnMove(p);
if (Target != null && Target.IsReady)
{
var old_last = LastPoint;
LastPoint = p.ToMap(Target.GridWidth);
GenericDraw.Line(old_last, LastPoint, Target.DefaultDrawColor, FakeDrawPoints);
Target.FakeDrawPixel(FakeDrawPoints.GetDistributionColor(Target, Width));
}
}
示例8: OnEnd
protected override bool OnEnd(Point p)
{
base.OnEnd(p);
if (Target != null && ColorHolder != null && Target.IsReady)
{
var points = new Dictionary<Point, Color>();
GenericDraw.Line(BeginPoint, p.ToMap(Target.GridWidth), ColorHolder, points);
var command = new DrawPixelCommand()
{
Points = points.GetDistributionColor(Target, Width),
Target = Target,
};
CommandManager.Instance.Do(command);
Target.UpdateDrawable();
return true;
}
return false;
}
示例9: OnEnd
protected override bool OnEnd(Point p)
{
base.OnEnd(p);
if (Target != null && ColorHolder != null && Target.IsReady)
{
var mapp = p.ToMap(Target.GridWidth);
var points = GenericDraw.GetPointsWithSameColor(Target, mapp, Target.ReadPixel(mapp));
var command = new DrawPixelCommand()
{
Points = points.Select(x => new KeyValuePair<Point, Color>(x.Key, ColorHolder)),
Target = Target,
};
CommandManager.Instance.Do(command);
Target.UpdateDrawable();
return true;
}
return false;
}