Changeset 3253 for libcaca/trunk/caca-php/caca.php
- Timestamp:
- Nov 3, 2008, 11:03:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/caca.php
r3225 r3253 17 17 private $cv; 18 18 19 function importFile($path, $codec) { 20 return caca_import_file($this->cv, $path, $codec); 21 } 22 23 function importString($codec) { 24 return caca_import_string($this->cv, $codec); 25 } 26 27 function exportString($codec) { 28 return caca_export_string($this->cv, $codec); 29 } 30 31 function freeFrame($id) { 32 return caca_free_frame($this->cv, $id); 33 } 34 35 function frameCount() { 36 return caca_get_frame_count($this->cv); 37 } 38 39 function createFrame($id) { 40 return caca_create_frame($this->cv, $id); 41 } 42 43 function setFrameName($name) { 44 return caca_set_frame_name($this->cv, $name); 45 } 46 47 function setFrame($id) { 48 return caca_set_frame($this->cv, $id); 49 } 50 19 51 function putFigchar($char) { 20 52 return caca_put_figchar($this->cv, $char); … … 25 57 } 26 58 27 function getFrameCount() {28 return caca_get_frame_count($this->cv);29 }30 31 59 function putAttr($attr) { 32 60 return caca_put_attr($this->cv, $attr); … … 216 244 class Display { 217 245 private $dp; 246 247 function setCursor($visible) { 248 return caca_set_cursor($this->dp, $visible); 249 } 218 250 219 251 function refresh() { … … 366 398 } 367 399 } 400 401 class Font { 402 private $f; 403 404 function getWidth() { 405 return caca_get_font_width($this->f); 406 } 407 408 function getHeight() { 409 return caca_get_font_height($this->f); 410 } 411 412 function getBlocks() { 413 return caca_get_font_blocks($this->f); 414 } 415 416 function __construct($name) { 417 $this->f = caca_load_builtin_font($name); 418 } 419 }
Note: See TracChangeset
for help on using the changeset viewer.