CreateSignatureRectangleEx

Declaration

Delphi

function CreateSignatureRectangleEx(X, Y, Width, Height, Color, xOffSet, yOffSet, Options: Integer): Boolean;

C/C++

SOPAD_API BOOL SOPAD_CreateSignatureRectangleEx(int X, int Y, int Width, int Height, int Color, int xOffSet, int  yOffSet, int Options);

ActiveX

HRESULT CreateSignatureRectangleEx([in] long x, [in] long y, [in] long Width, [in] long Height, [in] long Color, [in] long xOffSet, [in] long yOffSet, [in] long Options, [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

 

xOffSet

translation of the signature x-start position. The column of the left margin of the signature rectangle in document signing mode with the G13.

 

yOffSet

translation of the signature y-start position. The row of the lower margin of the signature rectangle in document signing mode with the G13.

 

Options

A bitmask that allows to toggle the centering in document signing mode with the G13. U8 optionBits:

  • bit0=scrollXEnable
  • bit1=scrollYEnable
  • bit2=centerXEnable
  • bit3=centerYEnable


 

Sample

C#
//  Prepared SignBackground with an red rectangle
Bitmap bmp = new Bitmap(SignInDoc.jpg);
            
//  Sign Rectangle based on the SignBackground Image
SigDev.CreateSignatureRectangleEx(145, 165, 400, 270, 0, 0,0,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);
Â