Exemple #1
0
 public static Polygon2d Отрезок_(Geometric2d geometric_this, Geometric2d geometric)
 {
     if (geometric_this is Circle)
     {
         if (geometric is Circle)
             return Отрезок(geometric_this as Circle, geometric as Circle);
         if (geometric is Plane2d)
             return Отрезок(geometric_this as Circle, geometric as Plane2d);
     }
     if (geometric_this is Plane2d)
     {
         if (geometric is Circle)
             return Отрезок(geometric as Circle, geometric_this as Plane2d);
     }
     return new Polygon2d();
 }
Exemple #2
0
        } // !!!Переделать!!!

        public static void FillAndDraw_(this Graphics graphics, Polygon2d region, Brush brush, Pen pen, Geometric2d geometric)
        {
            if (geometric is Point2d)
                graphics.FillAndDraw(brush, pen, geometric as Point2d);
            if (geometric is Geometric2dWithPointScalar)
                graphics.FillAndDraw(brush, pen, geometric as Geometric2dWithPointScalar);
            if (geometric is Geometric2dWithPointVector)
                graphics.FillAndDraw(brush, pen, geometric as Geometric2dWithPointVector);
            if (geometric is Polygon2d)
                graphics.FillAndDraw(brush, pen, geometric as Polygon2d);
            if (geometric is Plane2d)
                graphics.FillAndDraw(region, brush, pen, geometric as Plane2d);
        }