SvgAvatarGeneratorGenerate - метод

Generates an SVG avatar for initials of name(s).

Definition

Пространство имён: Tessa.Content.Avatars
Сборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
public static string Generate(
	string firstName,
	string? lastName,
	string? background = null,
	string foreground = "#ffffff",
	int size = 64,
	int fontSize = 26,
	bool round = true
)

Параметры

firstName  String
The first name. It will be used to generate the initials.
lastName  String
The last name. If provided, it will be included in the initials. If not, only the first name will be used.
background  String  (Optional)
The background color of the avatar. If not provided, a color will be generated based on the name(s).
foreground  String  (Optional)
The font color for the initials. The default is white #ffffff.
size  Int32  (Optional)
The size of the avatar in pixels. The default is 64px.
fontSize  Int32  (Optional)
The font size of the initials in pixels. The default is 26px.
round  Boolean  (Optional)
Indicates whether the avatar should be round.

Возвращаемое значение

String
A string containing the SVG markup representing the avatar with initials.

См. также