/// <summary>
        /// Gets the UIElement that can be added to the plot
        /// </summary>
        /// <returns></returns>
        public void RenderFilledElements(DrawingContext ctx, Rect chartArea, Transform transform)
        {
            if (this.FillColor == Colors.Transparent)
            {
                return;
            }
            CalculateGeometry();
            Brush brush = IsDashed ? (Brush)(ChartUtilities.CreateHatch50(this.FillColor, new Size(2, 2))) : (Brush)(new SolidColorBrush(this.FillColor));

            _filledGeometry.Transform = transform;
            ctx.DrawGeometry(brush, null, _filledGeometry);
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the UIElement that can be added to the plot
        /// </summary>
        /// <returns></returns>
        public void RenderFilledElements(DrawingContext ctx, Rect chartArea, Transform transform)
        {
            CalculateGeometry();
            int colorIndex = 0;

            foreach (var childGeometry in _filledGeometry.Children)
            {
                Color fillColor = _colors[colorIndex].Item2;
                if (fillColor != Colors.Transparent)
                {
                    Brush brush = IsDashed ? (Brush)(ChartUtilities.CreateHatch50(fillColor, new Size(2, 2))) : (Brush)(new SolidColorBrush(fillColor));
                    childGeometry.Transform = transform;
                    ctx.DrawGeometry(brush, null, childGeometry);
                }
                ++colorIndex;
            }
        }