Changeset 3193 for libcaca/trunk
- Timestamp:
- Nov 1, 2008, 10:11:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/caca.php
r3192 r3193 29 29 } 30 30 31 function getAttr(, ) { 31 function getAttr($x, $y) { 32 return caca_get_attr($this->cv, $x, $y); 32 33 } 33 34 34 function setAttr() { 35 function setAttr($attr) { 36 return caca_set_attr($this->cv, $x, $y, $attr); 35 37 } 36 38 … … 40 42 41 43 function setColorARGB($foreground, $background) { 44 return caca_set_color_argb($this->cv, $foreground, $background); 42 45 } 43 46 … … 58 61 } 59 62 60 function Blit(, , $c1, $c2) { 63 function Blit($x, $y, $canvas, $mask = false) { 64 return caca_blit($this->cv, $x, $y, $canvas->get_resource(), ($mask != false) ? $mask->get_resource() : false ); 61 65 } 62 66 … … 85 89 } 86 90 87 function drawLine(, , , , ) { 91 function drawLine($x1, $y1, $x2, $y2, $char) { 92 return caca_draw_line($this->cv, $x1, $y1, $x2, $y2, $color); 88 93 } 89 94 90 function drawPolyline() { 95 function drawPolyline($points, $char) { 96 return caca_draw_polyline($this->cv, $points, $char); 91 97 } 92 98 93 function drawThinLine(, , , ) { 99 function drawThinLine($x1, $y1, $x2, $y2) { 100 return caca_draw_thin_line($this->cv, $x1, $y1, $x2, $y2); 94 101 } 95 102 96 function drawThinPolyline() { 103 function drawThinPolyline($points) { 104 return caca_draw_thin_polyline($this->cv, $points); 97 105 } 98 106 99 function drawCircle(, , , ) { 107 function drawCircle($x, $y, $radius, $char) { 108 return caca_draw_circle($this->cv, $x, $y, $radius, $char); 100 109 } 101 110 102 function drawEllipse(, , , , ) { 111 function drawEllipse($x1, $y1, $x2, $y2, $char) { 112 caca_draw_ellipse($this->cv, $x1, $y1, $x2, $y2, $char); 103 113 } 104 114 105 function drawThinEllipse(, , , ) { 115 function drawThinEllipse($x1, $y1, $x2, $y2) { 116 caca_draw_ellipse($this->cv, $x1, $y1, $x2, $y2); 106 117 } 107 118 108 function fillEllipse(, , , , ) { 119 function fillEllipse($x1, $y1, $x2, $y2, $char) { 120 caca_fill_ellipse($this->cv, $x1, $y1, $x2, $y2, $char); 109 121 } 110 122 111 function drawBox(, , , , ) { 123 function drawBox($x1, $y1, $x2, $y2, $char) { 124 caca_draw_box($this->cv, $x1, $y1, $x2, $y2, $char); 112 125 } 113 126 114 function drawThinBox(, , , ) { 127 function drawThinBox($x1, $y1, $x2, $y2) { 128 caca_draw_thin_box($this->cv, $x1, $y1, $x2, $y2); 115 129 } 116 130 117 function drawCP437Box(, , , ) { 131 function drawCP437Box($x1, $y1, $x2, $y2) { 132 caca_draw_cp437_box($this->cv, $x1, $y1, $x2, $y2); 118 133 } 119 134 120 function fillBox(, , , , ) { 135 function fillBox($x1, $y1, $x2, $y2, $char) { 136 caca_fill_box($this->cv, $x1, $y1, $x2, $y2, $char); 121 137 } 122 138 123 function drawTriangle(, , , , , , ) { 139 function drawTriangle($x1, $y1, $x2, $y2, $x3, $y3, $char) { 140 caca_draw_triangle($this->cv, $x1, $y1, $x2, $y2, $x3, $y3, $char); 124 141 } 125 142 126 function drawThriangle(, , , , , ) { 143 function drawThinTriangle($x1, $y1, $x2, $y2, $x3, $y3) { 144 caca_draw_thin_triangle($this->cv, $x1, $y1, $x2, $y2, $x3, $y3); 127 145 } 128 146 129 function fillTriangle(, , , , , , ) { 147 function fillTriangle($x1, $y1, $x2, $y2, $x3, $y3, $char) { 148 caca_fill_triangle($this->cv, $x1, $y1, $x2, $y2, $x3, $y3, $char); 130 149 } 131 150 … … 133 152 cv = caca_create_canvas($width, $height); 134 153 } 154 155 function get_resource() { 156 return $this->cv; 157 } 135 158 }
Note: See TracChangeset
for help on using the changeset viewer.