KitchenDraw SDK 2
Show / Hide Table of Contents

Method ExportImage

ExportImage(string, int, int, bool, string, int, int)

Exports the scene view window contents as a raster or vectorial image.

Declaration
public void ExportImage(string filename, int imageWidth, int imageHeight, bool transparent = true, string backgroundColor = "255,255,255", int jpegQuality = 80, int antialiasing = 1)
Parameters
Type Name Description
string filename

Filename of the file to create. The image format is determined from the filename extension.

int imageWidth

Width of the exported image.

int imageHeight

Height of the exported image

bool transparent

Indicates whether an image should be exported with transparent background. This parameter is ignored for the formats that do not support transparency.

string backgroundColor

Background color of the image. It's a character string representing the decimal values in range 0-255 for red, green, and blue, comma-separated (e.g. 255,128,0). If an empty string is given, the background will be white. This parameter is ignored if transparent is set to true.

int jpegQuality

The quality level of the image if the export format is JPEG. Should be in 0-100 range.

int antialiasing

Specified the antialiasing level used to reduce the stairs effect on the oblique lines. 1 means no antialiasing. 2 means that the image will be generated twice wider and twice higher than needed to export, and then each pixel of the final image will be obtained by calculating average colour of 4 pixels. 3 means that the first image will be generated 3 times wider and higher than needed, and than 9 pixels will be accounted to get the final pixel colour. It is not recommended to use antialiasing level higher than 3. This parameter is ignored for vectorial images.

Remarks

Supported image formats are .JPG, .BMP, .GIF, .PNG, and .TIF for raster images. For vectorial images .EMF, .WMF, and .SVG are supported. Vectorial image can be exported in top view mode only.

In this article
Back to top Generated by DocFX