| @@ -1,5 +1,16 @@ | |||||
| #!/usr/bin/php5 | #!/usr/bin/php5 | ||||
| <?php | <?php | ||||
| /* | |||||
| * cacainfo.php sample program for libcaca php binding | |||||
| * Copyright (c) 2008 Nicolas Vion <nico@yojik.eu> | |||||
| * | |||||
| * This program is free software. It comes without any warranty, to | |||||
| * the extent permitted by applicable law. You can redistribute it | |||||
| * and/or modify it under the terms of the Do What The Fuck You Want | |||||
| * To Public License, Version 2, as published by Sam Hocevar. See | |||||
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| */ | |||||
| //--- Just for fun ---// | //--- Just for fun ---// | ||||
| @@ -1,5 +1,21 @@ | |||||
| #!/usr/bin/php5 | #!/usr/bin/php5 | ||||
| <?php | <?php | ||||
| /* | |||||
| * cacapig.php sample program for libcaca php binding | |||||
| * Copyright (c) 2008 Nicolas Vion <nico@yojik.eu> | |||||
| * | |||||
| * This file is a Php port of "cxx/cpptest.cpp" | |||||
| * which is: | |||||
| * Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org> | |||||
| * All Rights Reserved | |||||
| * | |||||
| * This program is free software. It comes without any warranty, to | |||||
| * the extent permitted by applicable law. You can redistribute it | |||||
| * and/or modify it under the terms of the Do What The Fuck You Want | |||||
| * To Public License, Version 2, as published by Sam Hocevar. See | |||||
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| */ | |||||
| $pig_str = <<<EOT | $pig_str = <<<EOT | ||||
| @@ -1,7 +1,17 @@ | |||||
| #!/usr/bin/php5 | #!/usr/bin/php5 | ||||
| <?php | <?php | ||||
| /* | |||||
| * dithering.php sample program for libcaca php binding | |||||
| * Copyright (c) 2008 Nicolas Vion <nico@yojik.eu> | |||||
| * | |||||
| * This program is free software. It comes without any warranty, to | |||||
| * the extent permitted by applicable law. You can redistribute it | |||||
| * and/or modify it under the terms of the Do What The Fuck You Want | |||||
| * To Public License, Version 2, as published by Sam Hocevar. See | |||||
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| */ | |||||
| $img = imagecreatefrompng(dirname(__FILE__)."/logo-caca.png"); | $img = imagecreatefrompng(dirname(__FILE__)."/logo-caca.png"); | ||||
| //$img = imagecreatefromgif(dirname(__FILE__)."/logo-caca-idx.gif"); | |||||
| if (!$img) | if (!$img) | ||||
| die("Can not open image.\n"); | die("Can not open image.\n"); | ||||
| @@ -1,5 +1,15 @@ | |||||
| #!/usr/bin/php5 | #!/usr/bin/php5 | ||||
| <?php | <?php | ||||
| /* | |||||
| * figfont.php sample program for libcaca php binding | |||||
| * Copyright (c) 2008 Nicolas Vion <nico@yojik.eu> | |||||
| * | |||||
| * This program is free software. It comes without any warranty, to | |||||
| * the extent permitted by applicable law. You can redistribute it | |||||
| * and/or modify it under the terms of the Do What The Fuck You Want | |||||
| * To Public License, Version 2, as published by Sam Hocevar. See | |||||
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| */ | |||||
| function unistr_to_ords($str, $encoding = 'UTF-8'){ | function unistr_to_ords($str, $encoding = 'UTF-8'){ | ||||
| $str = mb_convert_encoding($str, "UCS-4BE", $encoding); | $str = mb_convert_encoding($str, "UCS-4BE", $encoding); | ||||
| @@ -1,5 +1,15 @@ | |||||
| #!/usr/bin/php5 | #!/usr/bin/php5 | ||||
| <?php | <?php | ||||
| /* | |||||
| * polyline.php sample program for libcaca php binding | |||||
| * Copyright (c) 2008 Nicolas Vion <nico@yojik.eu> | |||||
| * | |||||
| * This program is free software. It comes without any warranty, to | |||||
| * the extent permitted by applicable law. You can redistribute it | |||||
| * and/or modify it under the terms of the Do What The Fuck You Want | |||||
| * To Public License, Version 2, as published by Sam Hocevar. See | |||||
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| */ | |||||
| function transform($tbl, $tx, $ty, $sx, $sy) { | function transform($tbl, $tx, $ty, $sx, $sy) { | ||||
| $result = array(); | $result = array(); | ||||