public static TEllipse FormatToReal(TEllipse ellipse) { TEllipse _new = new TEllipse(); _new.center = FormatToReal(ellipse.center); _new.size = FormatToReal(ellipse.size); return(_new); }
public void PopulateAllShape() { TRectangle rect = new TRectangle(); TEllipse ellipse = new TEllipse(); TStar star = new TStar(); TLine line = new TLine(); TArrow arrow = new TArrow(); shapes.Add(rect.getShapeName(), rect); shapes.Add(ellipse.getShapeName(), ellipse); shapes.Add(star.getShapeName(), star); shapes.Add(arrow.getShapeName(), arrow); shapes.Add(line.getShapeName(), line); }
// вхождение в составные зоны - Исключающий эллипс в эллипсе public static bool PointInDoubleZone(TPoint point, TEllipse in_parent_zone, TEllipse not_in_childzone) { return(PointInEllipse(point, in_parent_zone, MaxError) & (!PointInEllipse(point, not_in_childzone, MaxError))); }
// вхождение в составные зоны - Исключающий эллипс в эллипсе public static bool PointInDoubleZone(TPoint point, TEllipse in_parent_zone, TEllipse not_in_childzone, double EPS) { return(PointInEllipse(point, in_parent_zone, EPS) & (!PointInEllipse(point, not_in_childzone, EPS))); }
// вхождение точки в эллипс public static bool PointInEllipse(TPoint point, TEllipse ellipse) { return((bool)PointInEllipse(point, ellipse, MaxError)); }
// вхождение точки в эллипс public static bool PointInEllipse(TPoint point, TEllipse ellipse, double EPS) { return((bool)((sqr(point.X - ellipse.Center.X) / sqr(ellipse.XRadius) + sqr(point.Y - ellipse.Center.Y) / sqr(ellipse.YRadius)) <= (1 + EPS))); }