| @@ 375-412 (lines=38) @@ | ||
| 372 | } |
|
| 373 | } |
|
| 374 | ||
| 375 | function fill_box($im, $x, $y, $w, $h, $color1, $color2, $text='', $placeindex='') |
|
| 376 | { |
|
| 377 | global $col_black; |
|
| 378 | $x1=$x+$w-1; |
|
| 379 | $y1=$y+$h-1; |
|
| 380 | ||
| 381 | imagerectangle($im, $x, $y1, $x1+1, $y+1, $col_black); |
|
| 382 | if ($y1>$y) { |
|
| 383 | imagefilledrectangle($im, $x, $y, $x1, $y1, $color2); |
|
| 384 | } else { |
|
| 385 | imagefilledrectangle($im, $x, $y1, $x1, $y, $color2); |
|
| 386 | } |
|
| 387 | imagerectangle($im, $x, $y1, $x1, $y, $color1); |
|
| 388 | if ($text) { |
|
| 389 | if ($placeindex>0) { |
|
| 390 | if ($placeindex<16) { |
|
| 391 | $px=5; |
|
| 392 | $py=$placeindex*12+6; |
|
| 393 | imagefilledrectangle($im, $px+90, $py+3, $px+90-4, $py-3, $color2); |
|
| 394 | imageline($im, $x, $y+$h/2, $px+90, $py, $color2); |
|
| 395 | imagestring($im, 2, $px, $py-6, $text, $color1); |
|
| 396 | } else { |
|
| 397 | if ($placeindex<31) { |
|
| 398 | $px=$x+40*2; |
|
| 399 | $py=($placeindex-15)*12+6; |
|
| 400 | } else { |
|
| 401 | $px=$x+40*2+100*intval(($placeindex-15)/15); |
|
| 402 | $py=($placeindex%15)*12+6; |
|
| 403 | } |
|
| 404 | imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2); |
|
| 405 | imageline($im, $x+$w, $y+$h/2, $px, $py, $color2); |
|
| 406 | imagestring($im, 2, $px+2, $py-6, $text, $color1); |
|
| 407 | } |
|
| 408 | } else { |
|
| 409 | imagestring($im, 4, $x+5, $y1-16, $text, $color1); |
|
| 410 | } |
|
| 411 | } |
|
| 412 | } |
|
| 413 | ||
| 414 | ||
| 415 | $size = GRAPH_SIZE; // image size |
|
| @@ 581-618 (lines=38) @@ | ||
| 578 | exit(0); |
|
| 579 | } |
|
| 580 | ||
| 581 | function fill_box($im, $x, $y, $w, $h, $color1, $color2, $text='', $placeindex='') |
|
| 582 | { |
|
| 583 | global $col_black; |
|
| 584 | $x1=$x+$w-1; |
|
| 585 | $y1=$y+$h-1; |
|
| 586 | ||
| 587 | imagerectangle($im, $x, $y1, $x1+1, $y+1, $col_black); |
|
| 588 | if ($y1>$y) { |
|
| 589 | imagefilledrectangle($im, $x, $y, $x1, $y1, $color2); |
|
| 590 | } else { |
|
| 591 | imagefilledrectangle($im, $x, $y1, $x1, $y, $color2); |
|
| 592 | } |
|
| 593 | imagerectangle($im, $x, $y1, $x1, $y, $color1); |
|
| 594 | if ($text) { |
|
| 595 | if ($placeindex>0) { |
|
| 596 | if ($placeindex<16) { |
|
| 597 | $px=5; |
|
| 598 | $py=$placeindex*12+6; |
|
| 599 | imagefilledrectangle($im, $px+90, $py+3, $px+90-4, $py-3, $color2); |
|
| 600 | imageline($im, $x, $y+$h/2, $px+90, $py, $color2); |
|
| 601 | imagestring($im, 2, $px, $py-6, $text, $color1); |
|
| 602 | } else { |
|
| 603 | if ($placeindex<31) { |
|
| 604 | $px=$x+40*2; |
|
| 605 | $py=($placeindex-15)*12+6; |
|
| 606 | } else { |
|
| 607 | $px=$x+40*2+100*intval(($placeindex-15)/15); |
|
| 608 | $py=($placeindex%15)*12+6; |
|
| 609 | } |
|
| 610 | imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2); |
|
| 611 | imageline($im, $x+$w, $y+$h/2, $px, $py, $color2); |
|
| 612 | imagestring($im, 2, $px+2, $py-6, $text, $color1); |
|
| 613 | } |
|
| 614 | } else { |
|
| 615 | imagestring($im, 4, $x+5, $y1-16, $text, $color1); |
|
| 616 | } |
|
| 617 | } |
|
| 618 | } |
|
| 619 | ||
| 620 | ||
| 621 | function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $color2, $text='', $placeindex=0) |
|