diff --git a/caca-php/examples/example1.php b/caca-php/examples/example1.php index dda24cd..d62fb48 100755 --- a/caca-php/examples/example1.php +++ b/caca-php/examples/example1.php @@ -36,7 +36,7 @@ if (!$display) { caca_set_color_ansi($pig, CACA_LIGHTMAGENTA, CACA_TRANSPARENT); caca_set_color_ansi($canvas, CACA_LIGHTBLUE, CACA_TRANSPARENT); -caca_import_memory($pig, $pig_str, "text"); +caca_import_string($pig, $pig_str, "text"); caca_set_display_time($display, 30000); $x = $y = 0; diff --git a/caca-php/examples/text.php b/caca-php/examples/text.php new file mode 100755 index 0000000..7d9d5da --- /dev/null +++ b/caca-php/examples/text.php @@ -0,0 +1,62 @@ +#!/usr/bin/php5 + + * + * This file is a Php port of the official libcaca's sample program "demo.c" + * which is: + * Copyright (c) 2003 Sam Hocevar + * + * 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. + */ + +$string = <<