コード例 #1
0
        void DrawControlHandle(Graphics graphics, Point point, BezierPoint controlHandle)
        {
            Color color = Color.Black;

            switch (controlHandle)
            {
            case BezierPoint.StartPoint:
            case BezierPoint.EndPoint:
                color = EndPointColor;
                break;

            case BezierPoint.ControlPoint1:
            case BezierPoint.ControlPoint2:
                color = ControlPointColor;
                break;
            }

            bool  hover = controlHandle == HoverObject.ControlHandle;
            Brush brush = new SolidBrush(hover ? color : Color.FromArgb(180, color));

            PaintHelper.FillDot(graphics, brush, point, ControlHandleSize);
            PaintHelper.DrawDot(graphics, PenLine, point, ControlHandleSize);
        }