Svg.SvgRenderer.FromGraphics C# (CSharp) Method

FromGraphics() public static method

Creates a new SvgRenderer from the specified Graphics.
public static FromGraphics ( Graphics graphics ) : SvgRenderer
graphics System.Drawing.Graphics The to create the renderer from.
return SvgRenderer
        public static SvgRenderer FromGraphics(Graphics graphics)
        {
            SvgRenderer renderer = new SvgRenderer();
            renderer._innerGraphics = graphics;
            return renderer;
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Initializes the <see cref="SvgText"/> class.
        /// </summary>
        static SvgText()
        {
            Bitmap bitmap   = new Bitmap(1, 1);
            var    graphics = Graphics.FromImage(bitmap);

            graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
            _stringMeasure             = SvgRenderer.FromGraphics(graphics);
        }
All Usage Examples Of Svg.SvgRenderer::FromGraphics