Method SkStamp
SkStamp(Nullable<SKPaint>, Nullable<Single>, Nullable<SKTypeface>, SKFontStyleSlant, TextBuilder)
Whether to textually stamp the signature image
Declaration
public Behaviour SkStamp(SKPaint? paint = null, float? fontSize = null, SKTypeface? sKtypeface = null, SKFontStyleSlant slant = null, TextBuilder textBuilder = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<SKPaint> | paint | This Sets the color of the text. |
| System.Nullable<System.Single> | fontSize | This Sets the FontSize |
| System.Nullable<SKTypeface> | sKtypeface | This Sets font name . checkout SKFontFamily name List. |
| SKFontStyleSlant | slant | sets the SKFontStyleSlant style. |
| TextBuilder | textBuilder | The desired text builder. |
Returns
| Type | Description |
|---|---|
| Behaviour | Behaviour |
Examples
This example uses the default stamp
Behaviour behaviour = Behaviour.GetDefault().SKStamp();
This example uses the default stamp in green
Behaviour behaviour = Behaviour.GetDefault().SKStamp(SKColors.Green);
This example uses the default stamp text without the signing reason
Behaviour behaviour = Behaviour.GetDefault()
.SKStamp(null, null, null, null, Sig.SignAPI.Stamp.DefaultTextBuilder.Get(true, false, true, true));
This is an example for a custom text builder that prints the signer in bold.
The {signedBy} part makes a translated version of the text "Signed by" appear.
static string CustomStampTextBuilder(string signedBy, string signer, string reasonForSigningIs, string reason, string locationAndDateIs, string location, DateTime dateTime)
{
return $"{signedBy}: <b>{signer}</b>";
}
in another method block, one would use it as follows
Behaviour behaviour = Behaviour.GetDefault().SKStamp(null, null, null, null, CustomStampTextBuilder);
In custom stamp text builders the following markup tags lead to
<b>bold text</b>
<i>italic text</i>
<u>underlined text</u>
<br> line breaks.