示例#1
0
        /// <summary>
        /// Renders the <see cref="SvgDocument"/> to the specified <see cref="GraphicsPath"/>.
        /// </summary>
        /// <param name="path">The <see cref="GraphicsPath"/> to be rendered to.</param>
        /// <exception cref="ArgumentNullException">The <paramref name="path"/> parameter cannot be <c>null</c>.</exception>
        public void Draw(GraphicsPath path)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            var renderer = SvgPathRenderer.FromPath(path);

            renderer.SetBoundable(this);
            this.Render(renderer);
        }
示例#2
0
        public static ISvgRenderer FromNull()
        {
            GraphicsPath path = new GraphicsPath();

            return(SvgPathRenderer.FromPath(path));
        }