-
- header ("Content-type: image/png");
-
- $im = ImageCreate (150, 150);
- $grey = ImageColorAllocate ($im, 230, 230, 230) ;
- $black = ImageColorAllocate ($im, 0, 0, 0);
-
- ImageString($im, 3, 5, 5, "図 18.5: 円", $black);
- ImageArc($im, 75, 75 , 50, 50, 0, 360, $black);
- ImagePng ($im);
- ImageDestroy ($im);
- ?>
复制代
例2、绘制圆形 imagearcで円を描く()
-
- header("Content-type: image/png");
- $image = imagecreate( 200, 200 );
- $red = imagecolorallocate($image, 255,0,0) ;
- $blue = imagecolorallocate($image, 0,0,255 );
- imagearc( $image, 99, 99, 180, 180, 0, 360, $blue );
- imagefill( $image, 99, 99, $blue ) ;
- imagepng($image);
- ?>
复制幣
|