Changeset 3259 for libcaca/trunk


Ignore:
Timestamp:
Nov 3, 2008, 11:30:22 PM (11 years ago)
Author:
bsittler
Message:

now generates HTML

File:
1 edited

Legend:

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

    • Property svn:executable deleted
    r3258 r3259  
    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>sample program for libcaca php binding</title>
     29<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     30</head>
     31<body text="silver" bgcolor="black">
     32<?php
    2033
    2134define('CACA', "쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊");
    2235
    23 $cv = caca_create_canvas(0, 0);
     36$cv = caca_create_canvas(36, 12);
    2437if(! $cv)
    2538{
    2639        die("Can't created canvas\n");
    27 }
    28 $dp = caca_create_display($cv);
    29 if(! $dp)
    30 {
    31         die("Can't create display\n");
    3240}
    3341
     
    6977caca_blit($cv, 29, 1, $caca);
    7078
    71 caca_refresh_display($dp);
    72 
    73 caca_get_event($dp, CACA_EVENT_KEY_PRESS, -1);
     79echo caca_export_string($cv, "html3");
    7480
    7581?>
     82</body>
     83</html>
Note: See TracChangeset for help on using the changeset viewer.