jQuery元素屬性操作實例(設置、獲取及刪除元素屬性)
657
2024-02-19
(PHP 4, PHP 5)
imagechar — 水平地畫一個字符
$image
, int $font
, int $x
, int $y
, string $c
, int $color
)
imagechar() 將字符串
c
的第一個字符畫在
image
指定的圖像中,其左上角位于
x
,y
(圖像左上角為 0,
0),顏色為 color
。如果 font
是 1,2,3,4 或 5,則使用內置的字體(更大的數字對應于更大的字體)。
Example #1 imagechar() 例子
<?php
$im = imagecreate(100,100);
$string = 'PHP';
$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// prints a black "P" in the top left corner
imagechar($im, 1, 0, 0, $string, $black);
header('Content-type: image/png');
imagepng($im);
?>
參見 imagecharup() 和 imageloadfont()。
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!