Table of Contents

Method ToSvg

Namespace
LMKit.Graphics
Assembly
LM-Kit.NET.dll

ToSvg(int, int, string, string)

Renders the symbol as SVG markup: one path of dark modules over a light background, crisp at any scale.

public string ToSvg(int pixelSize = 0, int quietZone = 4, string darkColor = "#000000", string lightColor = "#ffffff")

Parameters

pixelSize int

Width and height attributes in CSS pixels, or 0 to omit them so the image takes the size its container gives it.

quietZone int

Light modules around the symbol on every side. The standard asks for four; a smaller margin is acceptable when the surrounding surface is already light.

darkColor string

CSS color of the dark modules.

lightColor string

CSS color of the background, or null for a transparent one.

Returns

string

A complete <svg> element.

Share