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/truecolor.php

    r4148 r4333  
    88<?php
    99/*
    10  *  truecolor     truecolor canvas features
     10 *  truecolor      truecolor canvas features
    1111 *  Copyright (c) 2008 Benjamin C. Wiley Sittler <bsittler@gmail.com>
    1212 *
    1313 *  This file is a Php port of "examples/truecolor.c"
    14  *  which is: 
     14 *  which is:
    1515 *  Copyright (c) 2006 Sam Hocevar <sam@hocevar.net>
    16  *                All Rights Reserved
    17  *
    18  *  $Id$
     16 *          All Rights Reserved
    1917 *
    2018 *  This program is free software. It comes without any warranty, to
     
    3432$cv = caca_create_canvas(32, 16);
    3533if(!$cv) {
    36         die("Failed to create canvas\n");
     34    die("Failed to create canvas\n");
    3735}
    3836
    3937for($y = 0; $y < 16; $y++)
    40         for($x = 0; $x < 16; $x++)
    41         {
    42                 $bgcolor = 0xff00 | ($y << 4) | $x;
    43                 $fgcolor = 0xf000 | ((15 - $y) << 4) | ((15 - $x) << 8);
    44                
    45                 caca_set_color_argb($cv, $fgcolor, $bgcolor);
    46                 caca_put_str($cv, $x * 2, $y, "CA");
    47         }
     38    for($x = 0; $x < 16; $x++)
     39    {
     40        $bgcolor = 0xff00 | ($y << 4) | $x;
     41        $fgcolor = 0xf000 | ((15 - $y) << 4) | ((15 - $x) << 8);
     42
     43        caca_set_color_argb($cv, $fgcolor, $bgcolor);
     44        caca_put_str($cv, $x * 2, $y, "CA");
     45    }
    4846
    4947caca_set_color_ansi($cv, CACA_WHITE, CACA_LIGHTBLUE);
Note: See TracChangeset for help on using the changeset viewer.