Constructor
# new Captcha(widthopt, heightopt, charactersopt)
Start captcha image creation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
width |
number |
<optional> |
Width of captcha image. |
height |
number |
<optional> |
Height of captcha image. |
characters |
number |
<optional> |
Size of captcha text. |
Members
Methods
# addDecoy(decoyOptionopt) → {Captcha}
Add decoy on your captcha image.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
decoyOption |
SetDecoyOptions |
<optional> |
Decoy option you want to customise |
# drawCaptcha(captchaOptionopt) → {Captcha}
Draw captcha text on captcha image.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
captchaOption |
DrawCaptchaOption |
<optional> |
# drawImage(image) → {Captcha}
Draw image on your captcha.
Parameters:
Name | Type | Description |
---|---|---|
image |
Image | Choose image you want to add. |
# drawTrace(traceOptionopt) → {Captcha}
Draw trace line over your captcha.
Note: If you want to use custom text or change size of captcha text then drawCaptcha before drawTrace.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
traceOption |
SetTraceOptions |
<optional> |