Changeset 3294 for libcaca/trunk


Ignore:
Timestamp:
Nov 6, 2008, 8:11:01 AM (11 years ago)
Author:
bsittler
Message:

fix some bugs and inconsistencies in the PHP object layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/caca.php

    r3293 r3294  
    5757        }
    5858
    59         function importString($codec) {
    60                 return caca_import_string($this->cv, $codec);
     59        function importString($str, $codec) {
     60                return caca_import_string($this->cv, $str, $codec);
    6161        }
    6262
     
    181181        }
    182182
    183         function Blit($x, $y, $canvas, $mask = false) {
    184                 return caca_blit($this->cv, $x, $y, $canvas->get_resource(), ($mask != false) ? $mask->get_resource() : false );
     183        function Blit($x, $y, $canvas, $mask = NULL) {
     184                if($mask)
     185                        return caca_blit($this->cv, $x, $y, $canvas->get_resource(), $mask->get_resource());
     186                return caca_blit($this->cv, $x, $y, $canvas->get_resource());
    185187        }
    186188
     
    451453        }
    452454
    453         function __construct($canvas, $driver = false) {
    454                 if ($driver)
     455        function __construct($canvas, $driver = NULL) {
     456                if($driver)
    455457                        $this->dp = caca_create_display_with_driver($canvas->get_resource(), $driver);
    456458                else
Note: See TracChangeset for help on using the changeset viewer.