Ignore:
Timestamp:
Feb 8, 2010, 2:27:22 AM (10 years ago)
Author:
Sam Hocevar
Message:

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/www/text.php

    r4148 r4333  
    1111 *  Copyright (c) 2008 Nicolas Vion <nico@yojik.eu>
    1212 *
    13  *  This file is a Php port of the official libcaca's sample program "demo.c" 
    14  *  which is: 
     13 *  This file is a Php port of the official libcaca's sample program "demo.c"
     14 *  which is:
    1515 *  Copyright (c) 2003 Sam Hocevar <sam@hocevar.net>
    1616 *
     
    3030
    3131$string =  <<<EOT
    32               |_| 
    33    _,----._   | | 
    34   (/ @  @ \)   __ 
    35    |  OO  |   |_ 
    36    \ `--' /   |__ 
    37     `----'       
    38               |_| 
    39  Hello world!  | 
     32              |_|
     33   _,----._   | |
     34  (/ @  @ \)   __
     35   |  OO  |   |_
     36   \ `--' /   |__
     37    `----'
     38              |_|
     39 Hello world!  |
    4040EOT;
    41        
     41
    4242$pig = caca_create_canvas(0, 0);
    4343caca_import_string($pig, $string, "text");
     
    4646
    4747if (!$cv or !$pig) {
    48         die("Can't created canvas\n");
     48    die("Can't created canvas\n");
    4949}
    5050
     
    6060
    6161for($j = 0; $j < caca_get_canvas_height($cv); $j++) {
    62         for($i = 0; $i < caca_get_canvas_width($cv); $i += 2) {
    63                 caca_set_color_ansi($cv, CACA_LIGHTBLUE + ($i + $j) % 6, CACA_DEFAULT);
    64                 $a = caca_get_attr($cv, -1, -1);
    65                 caca_put_attr($cv, $i, $j, $a);
    66                 caca_put_attr($cv, $i + 1, $j, $a);
    67         }
     62    for($i = 0; $i < caca_get_canvas_width($cv); $i += 2) {
     63        caca_set_color_ansi($cv, CACA_LIGHTBLUE + ($i + $j) % 6, CACA_DEFAULT);
     64        $a = caca_get_attr($cv, -1, -1);
     65        caca_put_attr($cv, $i, $j, $a);
     66        caca_put_attr($cv, $i + 1, $j, $a);
     67    }
    6868}
    6969
Note: See TracChangeset for help on using the changeset viewer.