本文整理汇总了C#中ICanvas.Invalidate方法的典型用法代码示例。如果您正苦于以下问题:C# ICanvas.Invalidate方法的具体用法?C# ICanvas.Invalidate怎么用?C# ICanvas.Invalidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICanvas
的用法示例。
在下文中一共展示了ICanvas.Invalidate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReverseTangent
protected virtual void ReverseTangent(ICanvas canvas)
{
m_tanReverse = !m_tanReverse;
MouseMoveTangent(canvas, m_p2);
canvas.Invalidate();
}
示例2: OnKeyDown
public virtual void OnKeyDown(ICanvas canvas, KeyEventArgs e)
{
if (e.KeyCode == Keys.D && (m_curPoint == eCurrentPoint.startAngle || m_curPoint == eCurrentPoint.endAngle))
{
if (Direction == eDirection.kCW)
Direction = eDirection.kCCW;
else
Direction = eDirection.kCW;
e.Handled = true;
}
if (e.KeyCode == Keys.C) // switch to centerRadius mode
{
m_center = UnitPoint.Empty;
m_radius = 0;
m_startAngle = 0;
m_endAngle = 0;
m_arcType = eArcType.typeCenterRadius;
m_curPoint = eCurrentPoint.center;
e.Handled = true;
canvas.Invalidate();
}
if (e.KeyCode == Keys.D2) // switch to 2 pointmode
{
m_center = UnitPoint.Empty;
m_radius = 0;
m_startAngle = 0;
m_endAngle = 0;
m_arcType = eArcType.type2point;
m_curPoint = eCurrentPoint.p1;
e.Handled = true;
canvas.Invalidate();
}
}