Method Stamp
Stamp(Brush, Font, TextBuilder)
Whether to textually stamp the signature image
Declaration
public Behaviour Stamp(Brush brush = null, Font font = null, TextBuilder textBuilder = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Brush | brush | The desired brush. |
| System.Drawing.Font | font | The desired font. |
| TextBuilder | textBuilder | The desired text builder. |
Returns
| Type | Description |
|---|---|
| Behaviour |
Remarks
The desired font might be resized such that the stamp text fits the signature field. This method may crash on Linux and MacOs, use SKStamp instead
Examples
This example uses the default stamp
Behaviour behaviour = Behaviour.GetDefault().Stamp();
This example uses the default stamp in green
Behaviour behaviour = Behaviour.GetDefault().Stamp(Brushes.Green);
This example uses the default stamp text without the signing reason
Behaviour behaviour = Behaviour.GetDefault()
.Stamp(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().Stamp(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.