VisualRender Method

Spotfire 14.3 API Reference

Note: This API is now obsolete.

Renders the visual to the specified graphics context.

Namespace:  Spotfire.Dxp.Application
Assembly:  Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
[ObsoleteAttribute("This API will not work on Linux. Please use Visual.RenderAsync(RenderResultSettings, VisualRenderSettings, CancellationToken) instead.")]
public void Render(
	Graphics graphics,
	Rectangle bounds
)

Parameters

graphics
Type: System.DrawingGraphics
The graphics context.
bounds
Type: System.DrawingRectangle
The rectangle to render to.
Examples

The following example shows how to render a visual to a png file.
C#
Visual visual = ...;
using (Bitmap image = new Bitmap(1024, 768))
{
    using (Graphics g = Graphics.FromImage(image))
    {
        visual.Render(g, new Rectangle(0, 0, image.Width, image.Height));
    }
    image.Save("C:\\image.png");
}
Version Information

Obsolete (compiler warning) in 14.3
Obsolete (compiler warning) in 14.2
Obsolete (compiler warning) in 14.1
Obsolete (compiler warning) in 14.0
Obsolete (compiler warning) in 12.5
Obsolete (compiler warning) in 12.4
Obsolete (compiler warning) in 12.3
Obsolete (compiler warning) in 12.2
Obsolete (compiler warning) in 12.1
Obsolete (compiler warning) in 12.0
Obsolete (compiler warning) in 11.8
See Also

Reference