protected override Style GetDefaultStyleCore()
        {
            int       alpha     = 255;
            AreaStyle areaStyle = StyleCandidates.OfType <AreaStyle>().FirstOrDefault();

            alpha = areaStyle != null ? areaStyle.FillSolidBrush.Color.AlphaComponent : 255;
            var fillColor    = new GeoColor(alpha, GeoColorHelper.GetRandomColor());
            var outlineColor = new GeoColor(alpha, GeoColor.SimpleColors.Black);

            return(AreaStyles.CreateSimpleAreaStyle(fillColor, outlineColor));
        }
        protected override Style GetDefaultStyleCore()
        {
            int       alpha = 255;
            LineStyle style = StyleCandidates.OfType <LineStyle>().FirstOrDefault();

            if (style != null)
            {
                alpha = style.OuterPen.Color.AlphaComponent;
            }
            var outerColor = new GeoColor(alpha, GeoColorHelper.GetRandomColor(RandomColorType.Bright));

            return(new LineStyle(new GeoPen(outerColor)));
        }
        protected override Style GetDefaultStyleCore()
        {
            int        alpha = 255;
            PointStyle style = StyleCandidates.OfType <PointStyle>().FirstOrDefault();

            if (style != null)
            {
                alpha = style.SymbolSolidBrush.Color.AlphaComponent;
            }
            var fillColor    = new GeoColor(alpha, GeoColorHelper.GetRandomColor());
            var outlineColor = new GeoColor(alpha, GeoColor.StandardColors.Black);

            return(PointStyles.CreateSimpleCircleStyle(fillColor, 8, outlineColor));
        }
Пример #4
0
        protected override Style GetDefaultStyleCore()
        {
            int            alpha = 255;
            WellPointStyle style = StyleCandidates.OfType <WellPointStyle>().FirstOrDefault();

            if (style != null)
            {
                alpha = style.SymbolSolidBrush.Color.AlphaComponent;
            }
            var fillColor    = new GeoColor(alpha, GeoColorHelper.GetRandomColor());
            var outlineColor = new GeoColor(alpha, GeoColor.StandardColors.Black);

            return(new WellPointStyle(1, new GeoSolidBrush(fillColor), new GeoPen(outlineColor), 8));
        }
        protected override Style GetDefaultStyleCore()
        {
            int       alpha = 255;
            LineStyle style = StyleCandidates.OfType <LineStyle>().FirstOrDefault();

            if (style != null)
            {
                alpha = style.OuterPen.Color.AlphaComponent;
            }
            GeoColor  outerColor = new GeoColor(alpha, GeoColorHelper.GetRandomColor(RandomColorType.Bright));
            LineStyle lineStyle  = new LineStyle(new GeoPen(outerColor));

            lineStyle.OuterPen.StartCap = DrawingLineCap.Round;
            lineStyle.OuterPen.EndCap   = DrawingLineCap.Round;
            return(lineStyle);
        }