On Fri, Feb 22, 2002 at 02:50:39PM +0000, Mark Fowler wrote:
>   $tester->has(10,10,50,50,$red,"has a red pixel");

You can do something like this:

 $tester->has( $tester->xywh($x, $y, $w, $h), ... );
 $tester->has( $tester->xyxy($x1, $y2, $x2, $y2), ... );

Use the xywh() and/or xyxy() methods to create and return an object
which encapsulates the arguments and has xywh() and xyxy() methods
which return/convert the argument in the appropriate form.

Then your has() method can look for an object reference as the 
first argument, otherwise assume it's the regular list of arguments.

>   GD::Image::rectangle($x1,$y1,$x2,$y2,$color)

This would be called as:

    GD::Image::rectangle($args->xyxy() ,$color)

A


Reply via email to