Ejemplo n.º 1
0
 public void DrawText(Style style, Point p, string text, float angle)
 {
     if (text.Length > 0 && EnsureStyle(ref style, StyleTypes.Text))
     {
         WToG(ref p);
         graphics.TranslateTransform(p.X, p.Y);
         angle += Angle;
         if (!Mirror)
         {
             angle = -angle;
         }
         GeomUtils.NormalizeAngle(ref angle);
         graphics.RotateTransform(angle);
         foreach (IBaseStyle baseStyle in style)
         {
             switch (baseStyle.StyleType)
             {
             case StyleTypes.Text:
                 TextStyle ts = baseStyle as TextStyle;
                 graphics.DrawString(text, ts.font, ts.brush, 0, 0, ts.stringFormat);
                 break;
             }
         }
         graphics.ResetTransform();
     }
 }
Ejemplo n.º 2
0
 public bool Contains(Point p)
 {
     if (!bounds.Contains(p))
     {
         return(false);
     }
     return(GeomUtils.Contains(points, p));
 }
Ejemplo n.º 3
0
 public long DistanceSq(Point p)
 {
     return(GeomUtils.DistanceSq(p, points));
 }