SvgAvatarGeneratorGeneratePhoto - метод
Generates a generic SVG user photo placeholder with a silhouette icon.
Пространство имён: Tessa.Content.AvatarsСборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
public static string GeneratePhoto(
string? background = "#e0e0e0",
string foreground = "#9e9e9e",
int size = 512,
bool round = false
)
Public Shared Function GeneratePhoto (
Optional background As String = "#e0e0e0",
Optional foreground As String = "#9e9e9e",
Optional size As Integer = 512,
Optional round As Boolean = false
) As String
public:
static String^ GeneratePhoto(
String^ background = L"#e0e0e0",
String^ foreground = L"#9e9e9e",
int size = 512,
bool round = false
)
static member GeneratePhoto :
?background : string *
?foreground : string *
?size : int *
?round : bool
(* Defaults:
let _background = defaultArg background "#e0e0e0"
let _foreground = defaultArg foreground "#9e9e9e"
let _size = defaultArg size 512
let _round = defaultArg round false
*)
-> string
- background String (Optional)
-
The background color of the avatar in hexadecimal format.
Default is light gray (#e0e0e0).
- foreground String (Optional)
-
The color of the user silhouette in hexadecimal format.
Default is medium gray (#9e9e9e).
- size Int32 (Optional)
-
The width and height of the generated SVG in pixels.
Default is 512px.
- round Boolean (Optional)
-
Indicates whether the avatar should have rounded corners.
When true, creates a circular avatar; when false, creates a square avatar.
Default is false.
String
A string containing SVG markup representing a generic user photo placeholder.
The SVG consists of a background rectangle and a simple user silhouette (head and shoulders).
This method creates a neutral, gender-agnostic user representation suitable for cases
where no actual photo is available. The generated SVG is vector-based and scales perfectly
to any size. The default color scheme uses contrasting grays for clear visibility.