LinuxÒÁµéÔ°ÂÛ̳'s Archiver

ÒøÉ«ÓÀÒÝ ·¢±íÓÚ 2006-2-28 16:56

¡¾ÌÖÂÛ¡¿ÓÃÀàºÍÆÕͨÃüÁîÓÐÇø±ðÚÀ~~~~

ÓÃÆÕͨÃüÁîʱÆÁÏÔÕý³££¬µ«Óá®À࡯¾Í²»ÐÐÁË£¬ÕÕµÀÀí¶¼Ò»ÑùµÄÂÄóöÀ´´ó¼ÒÌÖÂÛÒ»ÏÂ..................

<?php
  Header("Content-type: image/png");
  $im_width = 600 ;
  $im_hight = 240 ;
  $im_leftwidth = 45 ;
  $im_rightwidth = 18 ;
  $im_tophight = 20 ;
  $im_underhight = 38 ;
  $sim_border = 3 ;  //Í»³öµÄ²¿·Ö³¤¶È
  
  $im = Imagecreatetruecolor ($im_width,$im_hight);
  
  $col_background = ImageColorAllocate($im,0,0,0);
  $col_backgird = ImageColorAllocate($im,53,53,53);
  $col_xybase = ImageColorAllocate($im,109,109,109);
  $col_red = ImageColorAllocate($im,255,0,0);
  $col_blue = ImageColorAllocate($im,51,204,51);
  $col_font = ImageColorAllocate($im,116,116,116);
  $col_trans = ImageColorAllocate($im,67,68,69);

//===================================================
// BACK_ground_COLOR
// Description: background to the picture
//===================================================
  Imagefilledrectangle($im,$im_leftwidth,$im_tophight,$im_width-$im_tophight,$im_hight-$im_underhight-1,$col_backgird);
  Imagefilledrectangle($im,420,29.1,560,63,$col_trans);
  
  for( $y = $im_tophight ; $y <= $im_hight-$im_underhight-18.2 ; $y+=18.2 ){
   ImageLine($im,$im_leftwidth-$sim_border,$y,$im_width-$im_rightwidth-2,$y,$col_xybase);
  }
?>

ÈôÊÇ°ÑÆäÖС®$col_background ¡¯¨D¨D¡®$col_trans¡¯µÄ¶¨Ò岿·Ö»»³ÉÈçÏ£¬:confused: Ö´ÐоͲ»¶ÔÁË.....

  Class ImageColor {
function ColorSet($vername,$color_r,$color_g,$color_b) {
  $this->$vername = ImageColorAllocate($im,$color_r,$color_g,$color_b);
      }
  }
  
  $color = new ImageColor ;
  $color->Colorset($col_background,0,0,0);
  $color->Colorset($col_backgird,53,53,53);
  $color->Colorset($col_xybase,109,109,109);
  $color->Colorset($col_red,255,0,0);
  $color->Colorset($col_blue,51,204,51);
  $color->Colorset($col_font,116,116,116);
  $color->Colorset($col_trans,67,68,69);

Ò³: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.