(PECL imagick 2, PECL imagick 3)
ImagickDraw::setStrokeAntialias — 控制筆畫輪廓是否使用反鋸齒
此函式目前沒有說明文件;僅提供其參數列表。
控制筆畫輪廓是否使用反鋸齒。預設情況下,筆畫輪廓會使用反鋸齒。停用反鋸齒時,會對筆畫像素進行閾值處理,以確定應使用筆畫顏色還是底層畫布顏色。
stroke_antialias
反鋸齒設定
不傳回任何值。
範例 #1 ImagickDraw::setStrokeAntialias() 範例
<?php
function setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) {
$draw = new \ImagickDraw();
$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);
$draw->setStrokeWidth(1);
$draw->setStrokeAntialias(false);
$draw->line(100, 100, 400, 105);
$draw->line(100, 140, 400, 185);
$draw->setStrokeAntialias(true);
$draw->line(100, 110, 400, 115);
$draw->line(100, 150, 400, 195);
$image = new \Imagick();
$image->newImage(500, 250, $backgroundColor);
$image->setImageFormat("png");
$image->drawImage($draw);
header("Content-Type: image/png");
echo $image->getImageBlob();
}
?>