Method SkStamp
SkStamp(SKPaint, SKTypeface, TextBuilder)
Whether to textually stamp the signature image
Declaration
public Behaviour SkStamp(SKPaint paint = null, SKTypeface sKtypeface = null, TextBuilder textBuilder = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SkiaSharp.SKPaint | paint | This Sets the color of the text. |
| SkiaSharp.SKTypeface | sKtypeface | This Sets font name . checkout SKFontFamily name List. |
| 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, 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, 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.