Пример #1
0
        public static void DrawDropdownButton(Graphics g, Rectangle rect, bool isPressed)
        {
            GraphicsToolkit.Draw3DButton(g, rect, isPressed);

            // arrow
            int sx = rect.Left + rect.Width / 2;

            GraphicsToolkit.FillTriangle(g, 8, new Point(sx, rect.Top + 7 + (isPressed ? 1 : 0)));
        }
Пример #2
0
        public static PointF PointAtAtc(RectangleF rect, float angle)
        {
            float radians = (float)((GraphicsToolkit.AngleToArc(
                                         rect.Width, rect.Height, angle)) * Math.PI / 180f);

            float ww = rect.Width / 2;
            float hh = rect.Height / 2;

            float x = (float)Math.Sin(radians) * ww;
            float y = (float)Math.Cos(radians) * hh;

            return(new PointF(rect.X + ww + x, rect.Y + hh - y));
        }