protected GraphicsPath getControlContour(int aX, int aY, TSnapping aSnap) { int lWidth = _ARCRAD / 2; int lHeight = _ARCRAD; GraphicsPath lResult = new GraphicsPath(); lResult.StartFigure(); switch (aSnap) { case TSnapping.snapRight: lResult.AddArc(aX, aY, lWidth * 2, lHeight, 90, 180); break; case TSnapping.snapLeft: lResult.AddArc(aX, aY, lWidth * 2, lHeight, 270, 180); break; default: lResult.AddRectangle(new Rectangle(aX, aY, lWidth, lHeight)); break; } lResult.CloseFigure(); return(lResult); }
protected GraphicsPath getControlContour(int aX, int aY, TSnapping aSnap) { int lWidth = _ARCRAD / 2; int lHeight = _ARCRAD; GraphicsPath lResult = new GraphicsPath(); lResult.StartFigure(); switch (aSnap) { case TSnapping.snapRight: lResult.AddArc(aX, aY, lWidth * 2, lHeight, 90, 180); break; case TSnapping.snapLeft: lResult.AddArc(aX, aY, lWidth * 2, lHeight, 270, 180); break; default: lResult.AddRectangle(new Rectangle(aX, aY, lWidth, lHeight)); break; } lResult.CloseFigure(); return lResult; }