導航:首頁 > 編程語言 > php畫直線

php畫直線

發布時間:2025-09-28 00:19:11

php 折線圖怎麼添加一條平行於X軸的直線

1.打開Excel後,新建一個數據表,然後點擊【插入】面板上的圖表圖標,生成一個柱形圖。2..添加橫向參考線有兩種方法,第一種是直接繪制線條來添加。點擊選中圖表,然後點擊插入菜單中的形狀下的線條圖形,按住鍵盤Shift鍵,按住滑鼠左鍵拖拉繪制。繪制號以後,可以通過調整右側面板屬性的顏色,透明度等參數來設置參考線的風格。這種方式存在一個缺點,就是參考線不夠精確,所以對於需要精確數據的表格來說不推薦使用此種方法

⑵ 那位高人能告訴小女在用php GD庫做驗證碼的時候怎樣加入干擾線啊,注意不是直線啊,是那種曲線啊

這段代碼你可以看看,自己原創的哦,
<?php
$im = ImageCreate(200,200);

$red = ImageColorAllocate($im,0xFF,0x00,0x00);
$black = ImageColorAllocate($im,0x00,0x00,0x00);
$white = ImageColorAllocate($im,0xFF,0xFF,0xFF);
$ys1 = ImageColorAllocate($im,0xE9,0xB1,0x50);
$ys2 = ImageColorAllocate($im,0x98,0x25,0xCB);
$ys3 = ImageColorAllocate($im,0x40,0x88,0x47);

ImageFilledRectangle($im,50,50,150,150,$black);
//點
for($i=0;$i<300;$i++){
ImageSetPixel($im,rand(1,200),rand(1,200),$white);
}
//虛線
for($i=0;$i<10;$i++){
ImageDashedLine($im,rand(1,200),rand(1,200),rand(1,200),rand(1,200),$ys1);
}
//線
for($i=0;$i<10;$i++){
ImageLine($im,rand(1,200),rand(1,200),rand(1,200),rand(1,200),$ys1);
}
//矩形框
for($i=0;$i<3;$i++){
ImageRectangle($im,rand(1,200),rand(1,200),rand(1,200),rand(1,200),$ys1);
}
//矩形面
for($i=0;$i<2;$i++){
ImageFilledRectangle($im,rand(1,200),rand(1,200),rand(1,200),rand(1,200),$ys1);
}
//多邊形
$point = array(rand(1,200),rand(1,200),rand(1,200),rand(1,200),rand(1,200),rand(1,200));
ImagePolygon($im,$point,count($point)/2,$ys2);
ImageFilledPolygon($im,$point,count($point)/2,$ys2);
//弧線
ImageArc($im,rand(20,180),rand(20,180),rand(50,150),rand(50,150),rand(0,360),rand(0,360),$ys3);
//打字
ImageString($im,4,20,30,"add word",$ys3);
//ImageTTFText($im,30,0,rand(0,50),rand(30,200),$ys3,'msyhbd.ttf',"添加文字");

header('Content-Type:image/png');
ImagePNG($im);
?>

閱讀全文

與php畫直線相關的資料

熱點內容
我的世界java版伺服器網址是什麼 瀏覽:85
其他的文件夾英語 瀏覽:283
如何獲得本機的伺服器 瀏覽:487
程序員該學的軟體 瀏覽:627
新代刪文件夾 瀏覽:501
php文件引用方式 瀏覽:861
php畫直線 瀏覽:44
天貓app在哪裡邀人 瀏覽:720
php數組首字母大寫 瀏覽:514
共享寶馬是什麼app 瀏覽:856
st單片機ad問題 瀏覽:279
phpifor函數 瀏覽:573
完整的Java源碼 瀏覽:84
mac怎麼輸入終端命令 瀏覽:975
無法解壓文件系統映像文件 瀏覽:432
linuxtomcat命令 瀏覽:684
解壓之作完整版 瀏覽:786
bds加密文檔 瀏覽:203
外網怎麼遠程的伺服器地址 瀏覽:567
phpsql注入防範 瀏覽:262