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(); } }
public bool Contains(Point p) { if (!bounds.Contains(p)) { return(false); } return(GeomUtils.Contains(points, p)); }
public long DistanceSq(Point p) { return(GeomUtils.DistanceSq(p, points)); }