cvs: pearweb /public_html captcha-image.php

From: Date: Sat, 14 Aug 2004 23:25:48 +0000
Subject: cvs: pearweb /public_html captcha-image.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-22907@lists.php.net to get a copy of this message
danielc Sat Aug 14 19:25:48 2004 EDT Modified files: /pearweb/public_html captcha-image.php Log: * Rename and relocate some variables for clarity. http://cvs.php.net/diff.php/pearweb/public_html/captcha-image.php?r1=1.5&r2=1.6&ty=u Index: pearweb/public_html/captcha-image.php diff -u pearweb/public_html/captcha-image.php:1.5 pearweb/public_html/captcha-image.php:1.6 --- pearweb/public_html/captcha-image.php:1.5 Sat Aug 14 19:18:36 2004 +++ pearweb/public_html/captcha-image.php Sat Aug 14 19:25:48 2004 @@ -42,7 +42,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: captcha-image.php,v 1.5 2004/08/14 23:18:36 danielc Exp $ + * @version $Id: captcha-image.php,v 1.6 2004/08/14 23:25:48 danielc Exp $ */ if (!isset($_SESSION['captcha'])) { @@ -53,18 +53,18 @@ * SETTINGS =========================== */ $arc_count = 8; -$arc_pad_min = 5; -$arc_pad_max = $arc_pad_min * 4; $arc_deg_vary = 30; -$font_size_min = 25; -$font_size_max = 18; -$font_angle_min = -20; -$font_angle_max = 20; -$char_padding = 2; -$color_bg_min = 4; +$arc_pad_max = 20; +$arc_pad_min = 5; $color_bg_max = 5; -$color_fg_min = 1; +$color_bg_min = 4; $color_fg_max = 2; +$color_fg_min = 1; +$font_angle_max = 20; +$font_angle_min = -20; +$font_padding = 2; +$font_size_max = 25; +$font_size_min = 18; /* * Use full path to the fonts to avoid problems. @@ -120,7 +120,7 @@ $width = max($bbox[2], $bbox[4]) - min($bbox[0], $bbox[6]); $height = max($bbox[1], $bbox[3]) - min($bbox[7], $bbox[5]); - $image_width += $width + $char_padding; + $image_width += $width + $font_padding; $image_height = max($image_height, $height); $data[] = array( @@ -133,7 +133,7 @@ ); } -$image_width -= $char_padding; +$image_width -= $font_padding; /* * BASE IMAGE ========================= @@ -173,7 +173,7 @@ $pos_y = mt_rand($y_min, $y_max); imagettftext($im, $d['size'], $d['angle'], $pos_x, $pos_y, $colors[mt_rand(1, $color_max)], $d['font'], $d['char']); - $pos_x += $d['width'] + $char_padding; + $pos_x += $d['width'] + $font_padding; } /*

« previous php.pear.cvs (#22907) next »