AvatarGenerator Class
Generates SVG avatars from names and options.
public static class AvatarGeneratorMethods
| Name | Description |
|---|---|
| CreateSvg(string) | Creates an avatar SVG string for the specified name, using the default options. |
| CreateSvg(string, AvatarOptions) | Creates an avatar SVG string for the specified name and options. |
CreateSvg overloads
CreateSvg(string)
AvatarGenerator.csCreateSvg(string, AvatarOptions)
AvatarGenerator.csCreates an avatar SVG string for the specified name and options.
public static string CreateSvg(string name, AvatarOptions options)Parameters
namestring- The full name used to compute the color and default bigram.
optionsAvatarOptions- The generation options.
Returns
string The generated SVG string.
Remarks
Characters that are not valid in an XML document are removed from name. An explicit AvatarOptions.Bigram containing such characters is rejected instead.