|
@@ 378-390 (lines=13) @@
|
| 375 |
|
|
| 376 |
|
/////////////////////////////////////////////////////////////////////////// |
| 377 |
|
|
| 378 |
|
function toString() |
| 379 |
|
{ |
| 380 |
|
$ret = ''; |
| 381 |
|
|
| 382 |
|
for($i = 0; $i < $this->m_nColors; $i++) { |
| 383 |
|
$ret .= |
| 384 |
|
chr($this->m_arColors[$i] & 0x000000FF) . // R |
| 385 |
|
chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
| 386 |
|
chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
| 387 |
|
} |
| 388 |
|
|
| 389 |
|
return $ret; |
| 390 |
|
} |
| 391 |
|
|
| 392 |
|
/////////////////////////////////////////////////////////////////////////// |
| 393 |
|
|
|
@@ 394-407 (lines=14) @@
|
| 391 |
|
|
| 392 |
|
/////////////////////////////////////////////////////////////////////////// |
| 393 |
|
|
| 394 |
|
function toRGBQuad() |
| 395 |
|
{ |
| 396 |
|
$ret = ''; |
| 397 |
|
|
| 398 |
|
for($i = 0; $i < $this->m_nColors; $i++) { |
| 399 |
|
$ret .= |
| 400 |
|
chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B |
| 401 |
|
chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
| 402 |
|
chr($this->m_arColors[$i] & 0x000000FF) . // R |
| 403 |
|
"\x00"; |
| 404 |
|
} |
| 405 |
|
|
| 406 |
|
return $ret; |
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
/////////////////////////////////////////////////////////////////////////// |
| 410 |
|
|