Method SetSignBackground
SetSignBackground(String)
Reads an image from a file to be used as the sign background.
Declaration
Error SetSignBackground(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file to read from. |
Returns
Type | Description |
---|---|
Error | Error |
Remarks
SetSignBackground(Bitmap)
Sets the given image to be used as the sign backgorund.
Declaration
Error SetSignBackground(Bitmap bitmap)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Bitmap | bitmap | The image. |
Returns
Type | Description |
---|---|
Error | Error |
Remarks
If a black and white pad is connected, it is recommended to pass a black and white image.
Examples
The following example creates a black and white image. Sets it as the sign background and starts the signature mode. It is intended to be used with black and white devices.
Bitmap bwBitmap = IncompleteDoubleCross(600, 400);
//bwBitmap.Save("bwBitmap_600_400.bmp", ImageFormat.Bmp);
driver.SetSignBackground(bwBitmap);
driver.StartSignatureMode(SignMode.StandardSign);
// pass SignMode.DocumentSign for color devices
Bitmap IncompleteDoubleCross(int width, int height)
{
Bitmap bitmap = new Bitmap(width, height);
using Graphics graphics = Graphics.FromImage(bitmap);
graphics.DrawLine(Pens.White, width / 2, 0, width / 2, height);
graphics.DrawLine(Pens.White, 0, height / 2, width, height / 2);
graphics.DrawLine(Pens.White, 0, 0, width / 2, height / 2);
graphics.DrawImage(bitmap, 0, 0);
return bitmap;
}