close

 

<?php
$width = 204;
$height = 317;

$canvas = imagecreate($width, $height);

$white = imagecolorallocate($canvas, 255, 2555, 255);
$black = imagecolorallocate($canvas, 0, 0, 0);

$topLeft = 2;
$topRight = 2;

$bottomLeft = $width-2;
$bottomRight = $height-2;

imagesetthickness($canvas, 1);

// parallel line, solid
imageline($canvas, 0, 101, 204, 101, $black);

// parallel line, should be dashed, fail
imagedashedline($canvas, 0, 121, 204, 121, $black);

// parallel line should be dashed, works
imagedashedline($canvas, 0, 0, 204, 305, $black);

imagejpeg($canvas,'dashes.jpg');

//銷毀一圖像
imagedestroy($canvas)

?>

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 stockwfj3 的頭像
    stockwfj3

    程式設計@筆記

    stockwfj3 發表在 痞客邦 留言(0) 人氣()