Class SvgOptions

SvgOptions class

The SVG file format creation options.

public class SvgOptions : ImageOptionsBase, ITextAsShapesOptions


SvgOptions()The default constructor.


Callback { get; set; }Gets or sets the callback that can be used to store image and font binary data as user needs
CancellationToken { get; set; }Token that can be used to interrupt export operation
Layers { get; set; }Gets or sets a of layer names must be exported. All data will be exported without layers if names is not sets.
MinimumAbsoluteNonscaledLinewidth { get; set; }Lines with width in pixels less than this will be rescaled if absolute rescaling treshold
MinimumLinewidth { get; set; }Minumum width of the line relative to minimum non-rescaled linewidth. A line with width of 0 would be drawn with this width if rescaling is used ( as it is by default), lines thicker than that will be drawn thicker until they reach rescaling treshold, lines thicker than that won’t be rescaled.
MinimumRelativeLinewidthRatio { get; set; }Lines with width less than image’s size\minimumRelativeLinewidthRatio will be rescaled if relative rescaling treshold is used. A smaller dimension is picked as image size.
virtual Palette { get; set; }Gets or sets the color palette.
Pc3File { get; set; }Gets or sets the PC3 file full name.
RescaleSubpixelLinewidths { get; set; }Whether sub-pixel linewidths should be rescaled. If set to true, lines thinner than a width specified by other options will be drawn thicker, asymptotically approaching the minimum width
virtual ResolutionSettings { get; set; }Gets or sets the resolution settings.
Rotation { get; set; }Gets or sets the parameter for rotate, flip, or rotate and flip the image..
Source { get; set; }Gets or sets the source to create image in.
override TargetFormat { get; }
TextAsShapes { get; set; }Gets or sets a value indicating whether text must be converted as shapes. By default text will be converted to shapes, so it won’t be selectable.
Timeout { get; set; }Timeout value for export operation (in milliseconds)
UseAbsoluteRescaling { get; set; }Wether minimum non-rescaled line widh should be defined relative to whole image size (if false) or in pixels (if true). If false, use to specify maximum rate of image size to line width when line won’t be rescaled up yet. If true, use to specify minimum unscaled width in pixels
UserWatermarkColor { get; set; }Color for user-generated watermark
UserWatermarkText { get; set; }Text for user-generated watermark
VectorRasterizationOptions { get; set; }Gets or sets the vector rasterization options.
virtual XmpData { get; set; }Gets or sets the XMP metadata container.


//Renders loaded file and saves it to SVG using (var img = Image.Load(file)) { CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions(); SvgOptions opt = new SvgOptions(); opt.VectorRasterizationOptions = cadRasterizationOptions; cadRasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor; img.Save(outSvg, opt); }

See Also