Пример #1
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.PaintTo3D (IPaintTo3D)"/>
 /// </summary>
 /// <param name="paintTo3D"></param>
 public override void PaintTo3D(IPaintTo3D paintTo3D)
 {
     if (this.compoundShape == null)
     {
         return;
     }
     if ((paintTo3D.Capabilities & PaintCapabilities.CanFillPaths) != 0 && hatchStyle is HatchStyleSolid)
     {
         paintTo3D.OpenPath();
         Path[] paths = compoundShape.MakePaths(this.plane);
         for (int i = 0; i < paths.Length; i++)
         {
             paths[i].PaintTo3D(paintTo3D);
             paintTo3D.CloseFigure();
         }
         Color clr;
         if (paintTo3D.SelectMode)
         {
             clr = paintTo3D.SelectColor;
         }
         else
         {
             if ((hatchStyle as HatchStyleSolid).Color == null && this.ColorDef != null)
             {
                 clr = this.ColorDef.Color;
             }
             else
             {
                 clr = (hatchStyle as HatchStyleSolid).Color.Color;
             }
         }
         paintTo3D.ClosePath(clr);
     }
     else
     {
         if (needsRecalc)
         {
             Recalc();
         }
         if (OnPaintTo3D != null && OnPaintTo3D(this, paintTo3D))
         {
             return;
         }
         bool ps = paintTo3D.PaintSurfaces;
         paintTo3D.PaintFaces(CADability.PaintTo3D.PaintMode.All); // kommt immer mit CurvesOnly...
         for (int i = 0; i < base.Count; ++i)
         {
             (Child(i) as IGeoObjectImpl).PaintTo3D(paintTo3D);
         }
         if (!ps)
         {
             paintTo3D.PaintFaces(CADability.PaintTo3D.PaintMode.CurvesOnly);
         }
     }
 }