SvgAvatarGeneratorGenerateAvatar - метод
Generates an SVG avatar for initials of name(s).
Пространство имён: Tessa.Content.AvatarsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
public static string GenerateAvatar(
string firstName,
string? lastName,
string? background = null,
string foreground = "#ffffff",
int size = 64,
int fontSize = 26,
bool round = true
)
Public Shared Function GenerateAvatar (
firstName As String,
lastName As String,
Optional background As String = Nothing,
Optional foreground As String = "#ffffff",
Optional size As Integer = 64,
Optional fontSize As Integer = 26,
Optional round As Boolean = true
) As String
public:
static String^ GenerateAvatar(
String^ firstName,
String^ lastName,
String^ background = nullptr,
String^ foreground = L"#ffffff",
int size = 64,
int fontSize = 26,
bool round = true
)
static member GenerateAvatar :
firstName : string *
lastName : string *
?background : string *
?foreground : string *
?size : int *
?fontSize : int *
?round : bool
(* Defaults:
let _background = defaultArg background null
let _foreground = defaultArg foreground "#ffffff"
let _size = defaultArg size 64
let _fontSize = defaultArg fontSize 26
let _round = defaultArg round true
*)
-> string
- 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.
StringA string containing the SVG markup representing the avatar with initials.