SvgOptions class

SvgOptions class

The SVG file format creation options.

Inheritance: SvgOptionsImageOptionsBase

The SvgOptions type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the ImageOptionsBase class.

Properties

PropertyDescription
target_format
rotationGets or sets the parameter for rotate, flip, or rotate and flip the image..
layersGets or sets a of layer names must be exported.
All data will be exported without layers if names is not sets.
xmp_dataGets or sets the XMP metadata container.
sourceGets or sets the source to create image in.
paletteGets or sets the color palette.
resolution_settingsGets or sets the resolution settings.
vector_rasterization_optionsGets or sets the vector rasterization options.
watermark_guard_optionsGets or sets the blind watermark options.
timeoutTimeout value for export operation (in milliseconds)
pc_3_fileGets or sets the PC3 file full name.
render_to_graphics_boundGets or sets a value indicating which image sizes to use when rendering: graphic sizes (true, default) or set in metadata (false).
user_watermark_textText for user-generated watermark
user_watermark_colorColor for user-generated watermark
text_as_shapesGets 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.
callbackGets or sets the callback that can be used to store image and font binary data as user needs
rescale_subpixel_linewidthsWhether 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
use_absolute_rescalingWether minimum non-rescaled line widh should be defined relative to whole image size (if false) or in pixels (if true).
If false, use SvgOptions.minimum_relative_linewidth_ratio to specify maximum rate of image size to line width when line won’t be rescaled up yet.
If true, use SvgOptions.minimum_absolute_nonscaled_linewidth to specify minimum unscaled width in pixels
minimum_relative_linewidth_ratioLines 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.
minimum_absolute_nonscaled_linewidthLines with width in pixels less than this will be rescaled if absolute rescaling treshold
minimum_linewidthMinumum 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.

Example

//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