프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$backgroundColor | array | ||
$charset | |||
$codelen | |||
$contents | resource | ||
$distortion | boolean | ||
$fingerprint | array | ||
$font | 高度 | ||
$fontsize | 字体 | ||
$height | 宽度 | ||
$ignoreAllEffects | boolean | Ignore all effects | |
$interpolation | boolean | Is the interpolation enabled ? | |
$maxAngle | The maximum angle of char | ||
$maxBehindLines | The maximum number of lines to draw behind the image. null - use default algorithm | ||
$maxFrontLines | The maximum number of lines to draw in front of the image. null - use default algorithm | ||
$maxOffset | The maximum offset of char | ||
$phrase | string | ||
$textColor | array | ||
$useFingerprint | boolean | ||
$width | 位数 |
메소드 | 설명 | |
---|---|---|
GetCode ( ) : string | 获取验证码 | |
GetImg ( $n = null ) | 对外生成 | |
__construct ( ) | ||
build ( $fingerprint = null ) | Generate the image | |
create ( $phrase = null ) | Instantiation | |
directOutput ( $quality = 90 ) | Outputs the image | |
distort ( $image, $width, $height, $bg ) | Distorts the image | |
get ( $quality = 90 ) | Gets the image contents | |
getContents ( ) | The image contents | |
getFingerprint ( ) : array | ||
getGd ( ) | Gets the image GD | |
getPhrase ( ) | Gets the captcha phrase | |
inline ( $quality = 90 ) | Gets the HTML inline base64 | |
output ( ) | Outputs the image | |
setBackgroundColor ( $r, $g, $b ) | Sets the background color to use | |
setBackgroundImages ( array $backgroundImages ) | Sets the list of background images to use (one image is randomly selected) | |
setDistortion ( $distortion ) | Enables/disable distortion | |
setIgnoreAllEffects ( boolean $ignoreAllEffects ) : CaptchaBuilder | Sets the ignoreAllEffects value | |
setInterpolation ( $interpolate = true ) : CaptchaBuilder | Enable/Disables the interpolation | |
setMaxAngle ( $maxAngle ) | ||
setMaxBehindLines ( $maxBehindLines ) | ||
setMaxFrontLines ( $maxFrontLines ) | ||
setMaxOffset ( $maxOffset ) | ||
setPhrase ( $phrase ) | Setting the phrase | |
setTextColor ( $r, $g, $b ) | Sets the text color to use |
메소드 | 설명 | |
---|---|---|
createCode ( $n = null ) | 生成随机码 | |
drawLine ( $image, $width, $height, $tcol = null ) | Draw lines over the image | |
getCol ( $image, $x, $y, $background ) : integer | ||
getRGB ( $col ) : array | ||
interpolate ( $x, $y, $nw, $ne, $sw, $se ) : integer | ||
postEffect ( $image ) | Apply some post effects | |
rand ( $min, $max ) | Returns a random number or the next number in the fingerprint | |
writePhrase ( $image, $phrase, $font, $width, $height ) | Writes the phrase on the image |
protected drawLine ( $image, $width, $height, $tcol = null ) |
protected interpolate ( $x, $y, $nw, $ne, $sw, $se ) : integer | ||
$x | ||
$y | ||
$nw | ||
$ne | ||
$sw | ||
$se | ||
리턴 | integer |
protected rand ( $min, $max ) |
public setBackgroundColor ( $r, $g, $b ) |
public setBackgroundImages ( array $backgroundImages ) | ||
$backgroundImages | array |
public setIgnoreAllEffects ( boolean $ignoreAllEffects ) : CaptchaBuilder | ||
$ignoreAllEffects | boolean | |
리턴 | CaptchaBuilder |
public setInterpolation ( $interpolate = true ) : CaptchaBuilder | ||
$interpolate | bool True to enable, false to disable | |
리턴 | CaptchaBuilder |
protected writePhrase ( $image, $phrase, $font, $width, $height ) |
protected $maxBehindLines |
protected $maxFrontLines |