Changeset 3221 for libcaca


Ignore:
Timestamp:
Nov 2, 2008, 9:29:02 PM (11 years ago)
Author:
bsittler
Message:

htmlification of truecolor.php; evidently there are some bugs yet in the html3 exporter

File:
1 edited

Legend:

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

    • Property svn:executable deleted
    r3220 r3221  
    1 #!/usr/bin/php5
     1<?php
     2header('Content-Type: text/html; charset=UTF-8');
     3?>
     4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     5    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     6
     7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    28<?php
    39/*
     
    1824 *  http://sam.zoy.org/wtfpl/COPYING for more details.
    1925 */
     26?>
     27<head>
     28<title>truecolor canvas features</title>
     29<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     30</head>
     31<body text="silver" bgcolor="black">
     32<?php
    2033
    2134$cv = caca_create_canvas(32, 16);
    2235if(!$cv) {
    2336        die("Failed to create canvas\n");
    24 }
    25 
    26 $dp = caca_create_display($cv);
    27 if(!$dp) {
    28         die("Failed to create display\n");
    2937}
    3038
     
    4250caca_put_str($cv, 2, 1, " truecolor libcaca ");
    4351
    44 caca_refresh_display($dp);
    45 
    46 caca_get_event($dp, CACA_EVENT_KEY_PRESS, -1);
     52echo caca_export_string($cv, "html3");
    4753
    4854?>
     55</body>
     56</html>
Note: See TracChangeset for help on using the changeset viewer.