1<?php 2/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */ 3 4/** 5 * Image_Barcode2_Writer class 6 * 7 * An adapter for the non oo image writing code. 8 * 9 * PHP versions 5 10 * 11 * LICENSE: This source file is subject to version 3.0 of the PHP license 12 * that is available through the world-wide-web at the following URI: 13 * http://www.php.net/license/3_0.txt. If you did not receive a copy of 14 * the PHP License and are unable to obtain it through the web, please 15 * send a note to license@php.net so we can mail you a copy immediately. 16 * 17 * @category Image 18 * @package Image_Barcode2 19 * @author Ryan Briones <ryanbriones@webxdesign.org> 20 * @copyright 2005 The PHP Group 21 * @license http://www.php.net/license/3_0.txt PHP License 3.0 22 * @link http://pear.php.net/package/Image_Barcode2 23 */ 24/** 25 * Image_Barcode2_Writer class 26 * 27 * An adapter for the non oo image writing code. 28 * Just used to create a seam for phpunit 29 * 30 * @category Image 31 * @package Image_Barcode2 32 * @author Ryan Briones <ryanbriones@webxdesign.org> 33 * @copyright 2005 The PHP Group 34 * @license http://www.php.net/license/3_0.txt PHP License 3.0 35 * @version Release: @package_version@ 36 * @link http://pear.php.net/package/Image_Barcode2 37 * @todo See if http://pear.php.net/package/Image_Canvas can be made to work well 38 */ 39class Image_Barcode2_Writer 40{ 41 public function imagecreate($width, $height) 42 { 43 return imagecreate($width, $height); 44 } 45 46 public function imagestring($image, $font, $x, $y, $string, $color) 47 { 48 return imagestring($image, $font, $x, $y, $string, $color); 49 } 50 51 public function imagefill($image, $x, $y, $color) 52 { 53 return imagefill($image, $x, $y, $color); 54 } 55 56 public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) 57 { 58 return imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); 59 } 60 61 public function imagefontheight($font) 62 { 63 return imagefontheight($font); 64 } 65 66 public function imagefontwidth($font) 67 { 68 return imagefontwidth($font); 69 } 70 71 public function imagecolorallocate($image, $red, $green, $blue) 72 { 73 return imagecolorallocate($image, $red, $green, $blue); 74 } 75 76 public function imageline($image, $x1, $y1, $x2, $y2, $color) 77 { 78 return imageline($image, $x1, $y1, $x2, $y2, $color); 79 } 80} 81