Sfoglia il codice sorgente

* Add license headers in sample programs

tags/v0.99.beta17
Nicolas Vion nico 16 anni fa
parent
commit
a3aef93b3c
5 ha cambiato i file con 58 aggiunte e 1 eliminazioni
  1. +11
    -0
      caca-php/examples/cacainfo.php
  2. +16
    -0
      caca-php/examples/cacapig.php
  3. +11
    -1
      caca-php/examples/dithering.php
  4. +10
    -0
      caca-php/examples/figfont.php
  5. +10
    -0
      caca-php/examples/polyline.php

+ 11
- 0
caca-php/examples/cacainfo.php Vedi File

@@ -1,5 +1,16 @@
#!/usr/bin/php5
<?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 ---//



+ 16
- 0
caca-php/examples/cacapig.php Vedi File

@@ -1,5 +1,21 @@
#!/usr/bin/php5
<?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


+ 11
- 1
caca-php/examples/dithering.php Vedi File

@@ -1,7 +1,17 @@
#!/usr/bin/php5
<?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 = imagecreatefromgif(dirname(__FILE__)."/logo-caca-idx.gif");
if (!$img)
die("Can not open image.\n");



+ 10
- 0
caca-php/examples/figfont.php Vedi File

@@ -1,5 +1,15 @@
#!/usr/bin/php5
<?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'){
$str = mb_convert_encoding($str, "UCS-4BE", $encoding);


+ 10
- 0
caca-php/examples/polyline.php Vedi File

@@ -1,5 +1,15 @@
#!/usr/bin/php5
<?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) {
$result = array();


Caricamento…
Annulla
Salva