Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0e4ec6fcd3
Fetching contributors…

Cannot retrieve contributors at this time

file 37 lines (30 sloc) 1.113 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
<?php
/**
* An adapter for the non oo image writing code. Just used to
* create a seam for phpunit
*
* @todo See if there are other packages doing this already
*/
class Image_Barcode2_Writer {
    
    public function imagecreate($width, $height) {
        return imagecreate($width, $height);
    }

    public function imagestring($image, $font, $x, $y, $string, $color) {
        return imagestring($image, $font, $x, $y, $string, $color;
    }

    public function imagefill($image, $x, $y, $color) {
        return imagefill($image, $x, $y, $color);
    }

    public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) {
        return imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color);
    }
   
    public function imagestring($image, $font, $x , $y, $string, $color) {
        return imagestring($image, $font, $x , $y, $string, $color);
    }

    public function imagefontheight($font) {
        return imagefontheight($font);
    }

    public function imagecolorallocate($image, $red, $green, $blue) {
        return imagecolorallocate($image, $red, $green, $blue);
    }
}
Something went wrong with that request. Please try again.