Skip to end of metadata
Go to start of metadata

Declaration

Delphi

function CreateSignatureRectangle(X, Y, Width, Height, Color: Integer): Boolean;

C/C++

SOPAD_API BOOL SOPAD_CreateSignatureRectangle(int X, int Y, int Width, int Height, int Color);

ActiveX

HRESULT CreateSignatureRectangle([in] long x, [in] long y, [in] long Width, [in] long Height, [in] long Color, [out, retval] VARIANT_BOOL* Result);

Description

Function uses HID_CMD_CREATE_SIGNATURE_RECTANGLE command to define signature field bounds for naturaSign Colour devices.

if x,y,width and height is 0 then the maximum possible Signature Rectangle is used.

Color is a 32 Bit integer in RGB Format:

Bit 31-24 always 0

Bit 23-16 Red Value 0 - 255

Bit 15-08 Green Value 0 - 255

Bit 07-00 Blue Value 0 - 255

Arguments

x and y

Position of top-left corner of signature rectangle (starting at 0/0). If you using this function with the SignInDoc function of the Colour Devices the X/Y counts for the uploaded signing background image. Here is a sample how its working with SignInDoc, if you upload the following image and you want to set the Signing Area inside the red rectangle you would need to set X=145, Y=165, W= 400 and H=270.

Width and Height

Size of signature field area

Color

Color of signature rectangle

Sample

C#
//  Prepared SignBackground with an red rectangle
Bitmap bmp = new Bitmap(SignInDoc.jpg);
            
//  Sign Rectangle based on the SignBackground Image
SigDev.CreateSignatureRectangle(145, 165, 400, 270, 0);
            
//  Set Page Number
SigDev.SetDriverString(4, "1/2");
            
//  Upload image for SignInDoc and start signing
int res = SigDev.LCDImageExR(4, 0, 0, (int)bmp.GetHbitmap());
SigDev.startCapture("", false, false, false, false, ref padSetting);
 

 

 

  • No labels