Esempio n. 1
0
        Rectangle GetSelectionRect(Point p)
        {
            if (mouseDownPoint == nullPoint)
            {
                return(Rectangle.Empty);
            }
            Rectangle r = Rectangle.FromLTRB(mouseDownPoint.X, mouseDownPoint.Y, p.X, p.Y);

            GeomUtils.Normalize(ref r);
            return(r);
        }
Esempio n. 2
0
        public void DrawText(Style style, Point p, string text, float angle)
        {
            TextStyle ts = GetTextStyle(style);

            WToG(ref p);
            graphics.TranslateTransform(p.X, p.Y);
            angle += Angle;
            if (!Mirror)
            {
                angle = -angle;
            }
            GeomUtils.NormalizeAngle(ref angle);
            graphics.RotateTransform(angle);
            graphics.DrawString(text, ts.font, ts.brush, 0, 0, ts.stringFormat);
            graphics.ResetTransform();
        }