SvgAvatarGeneratorGenerate - метод
Generates an SVG avatar for initials of name(s).
Пространство имён: Tessa.Content.AvatarsСборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
public static string Generate(
string firstName,
string? lastName,
string? background = null,
string foreground = "#ffffff",
int size = 64,
int fontSize = 26,
bool round = true
)
Public Shared Function Generate (
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^ Generate(
String^ firstName,
String^ lastName,
String^ background = nullptr,
String^ foreground = L"#ffffff",
int size = 64,
int fontSize = 26,
bool round = true
)
static member Generate :
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.