public void RenderRectangle(Rect rectangle, Brush foreground)
        {
            var scaledRectangle = GeometryHelper.ScaleRectangle(_scale, rectangle);

            _foregroundContext.DrawRectangle(foreground, null, scaledRectangle);
        }
        public void RenderLine(Point startPoint, Point endPoint, Brush foreground)
        {
            var lineGeometry = new LineGeometry(GeometryHelper.ScalePoint(_scale, startPoint), GeometryHelper.ScalePoint(_scale, endPoint));

            _geometry.Children.Add(lineGeometry);
        }
Exemple #3
0
        public void RenderRectangle(Rect rectangle, Brush foreground)
        {
            var rectangleGeometry = new RectangleGeometry(GeometryHelper.ScaleRectangle(_scale, rectangle));

            _geometry.Children.Add(rectangleGeometry);
        }
        /// <summary>
        /// Renders an ellipse to the <see cref="GeometryGroup"/>.
        /// </summary>
        /// <param name="rectangle"></param>
        /// <param name="foreground"></param>
        public void RenderEllipse(Rect rectangle, Brush foreground, Brush background)
        {
            var ellipseGeometry = new EllipseGeometry(GeometryHelper.ScaleRectangle(_scale, rectangle));

            _geometry.Children.Add(ellipseGeometry);
        }