Exemple #1
0
        internal override object Clone()
        {
            BoxSymbol clone = new BoxSymbol();

            base.CloneAttributes(clone);
            return(clone);
        }
Exemple #2
0
        internal static PlotElement SymbolFromMarker(Marker marker)
        {
            switch (marker)
            {
            case Marker.Box:
                return(new BoxSymbol());

            case Marker.Dot:
                return(new DotSymbol());

            case Marker.Diamond:
            {
                BoxSymbol       symbol    = new BoxSymbol();
                RotateTransform transform = new RotateTransform();
                transform.Angle              = 45.0;
                symbol.RenderTransform       = transform;
                symbol.RenderTransformOrigin = new Point(0.5, 0.5);
                return(symbol);
            }

            case Marker.Triangle:
            {
                RPolygon        polygon    = new RPolygon();
                RotateTransform transform2 = new RotateTransform();
                transform2.Angle              = -90.0;
                polygon.RenderTransform       = transform2;
                polygon.RenderTransformOrigin = new Point(0.5, 0.5);
                return(polygon);
            }

            case Marker.Star4:
                return(new Star {
                    InnerRadius = 0.4
                });

            case Marker.Star8:
                return(new Star {
                    NumVertices = 8, InnerRadius = 0.4
                });

            case Marker.Cross:
                return(new Star {
                    InnerRadius = 0.0
                });

            case Marker.DiagonalCross:
            {
                Star            star4      = new Star();
                RotateTransform transform3 = new RotateTransform();
                transform3.Angle            = 45.0;
                star4.RenderTransform       = transform3;
                star4.RenderTransformOrigin = new Point(0.5, 0.5);
                star4.InnerRadius           = 0.0;
                return(star4);
            }
            }
            return(null);
        }