Ejemplo n.º 1
0
        private Collection <RingShape> GetRing(Collection <PUSymbol> PUSymbols, Dictionary <string, RGBColor> colorRef)
        {
            Collection <RingShape> shapes = new Collection <RingShape>();

            for (int i = 0; i < PUSymbols.Count; i++)
            {
                Collection <DAIShape> drawingShapes = PUSymbols[i].GetShapes(colorRef);
                RingShape             ring          = new RingShape(drawingShapes);
                ring.Color = drawingShapes[0].Color;
                ring.Width = drawingShapes[0].Width;

                shapes.Add(ring);
            }

            return(shapes);
        }
 private void DrawRing(RingShape ring, MappingConverter converter)
 {
     foreach (DAIShape shape in ring.Shapes)
     {
         if (shape.ShapeType == DAIShapeType.Line)
         {
             DrawLine(shape as LineShape, converter);
         }
         else if (shape.ShapeType == DAIShapeType.Circle)
         {
             DrawCircle(shape as CircleShape, converter);
         }
         else if (shape.ShapeType == DAIShapeType.Angle)
         {
             // TODO : can not be supported
         }
     }
 }
        private void FillRing(RingShape ring, Color fillColor, MappingConverter converter)
        {
            Collection <LineShape> lineShapes = new Collection <LineShape>();

            foreach (DAIShape shape in ring.Shapes)
            {
                if (shape.ShapeType == DAIShapeType.Line)
                {
                    FillLineShape(shape as LineShape, fillColor, converter);
                }
                else if (shape.ShapeType == DAIShapeType.Circle)
                {
                    FillCircleShape(shape as CircleShape, fillColor, converter);
                }
                else if (shape.ShapeType == DAIShapeType.Angle)
                {
                    // TODO : can not be supported
                }
            }
        }