jQuery Mobile彈出窗、彈出層知識匯總
640
2024-03-15
(PHP 4 >= 4.3.2, PHP 5)
imageantialias — 是否使用抗鋸齒(antialias)功能
$image
, bool $enabled
)
對線段和多邊形啟用快速畫圖抗鋸齒方法。不支持 alpha 部分。使用直接混色操作。僅用于真彩色圖像。
不支持線寬和風格。
使用抗鋸齒和透明背景色可能出現未預期的結果。混色方法把背景色當成任何其它顏色使用。缺乏 alpha 部分的支持導致不允許基于 alpha 抗鋸齒方法。
image
由圖象創建函數(例如imagecreatetruecolor())返回的圖象資源。
enabled
是否啟用抗鋸齒。
成功時返回 TRUE
, 或者在失敗時返回 FALSE
。
Example #1 A comparison of two lines, one with anti-aliasing switched on
<?php
// Setup an anti-aliased image and a normal image
$aa = imagecreatetruecolor(400, 100);
$normal = imagecreatetruecolor(200, 100);
// Switch antialiasing on for one image
imageantialias($aa, true);
// Allocate colors
$red = imagecolorallocate($normal, 255, 0, 0);
$red_aa = imagecolorallocate($aa, 255, 0, 0);
// Draw two lines, one with AA enabled
imageline($normal, 0, 0, 200, 100, $red);
imageline($aa, 0, 0, 200, 100, $red_aa);
// Merge the two images side by side for output (AA: left, Normal: Right)
imagecopymerge($aa, $normal, 200, 0, 0, 0, 200, 100, 100);
// Output image
header('Content-type: image/png');
imagepng($aa);
imagedestroy($aa);
imagedestroy($normal);
?>
以上例程的輸出類似于:
Note: 此函數僅在與 GD 庫捆綁編譯的 PHP 版本中可用。
imagecreatetruecolor() - 新建一個真彩色圖像
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!