本文整理匯總了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;
}