update : 2015.11.03
php.shukuma.com

검색:
 
 
Specifies the pattern of dashes and gaps used to stroke paths

ImagickDraw::setStrokeDashArray

(PECL imagick 2.0.0)

ImagickDraw::setStrokeDashArraySpecifies the pattern of dashes and gaps used to stroke paths

설명

bool ImagickDraw::setStrokeDashArray ( array $dashArray )
Warning

이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.

Specifies the pattern of dashes and gaps used to stroke paths. The strokeDashArray represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass a zero number_elements argument and null dash_array. A typical strokeDashArray_ array might contain the members 5 3 2.

인수

dashArray

array of floats

반환값

성공시에 TRUE를 반환합니다.

예제

Example #1 ImagickDraw::setStrokeDashArray()

<?php
function setStrokeDashArray($strokeColor$fillColor$backgroundColor) {

    
$draw = new \ImagickDraw();

    
$draw->setStrokeColor($strokeColor);
    
$draw->setFillColor($fillColor);
    
$draw->setStrokeWidth(4);

    
$draw->setStrokeDashArray([1010]);
    
$draw->rectangle(10050225175);

    
$draw->setStrokeDashArray([20520555,]);
    
$draw->rectangle(27550400175);

    
$draw->setStrokeDashArray([2052055]);
    
$draw->rectangle(100200225350);

    
$draw->setStrokeDashArray([11112233558813132121343455558989144144233233377377610610987987159715972584258441814181,]);

    
$draw->rectangle(275200400350);

    
$image = new \Imagick();
    
$image->newImage(500400$backgroundColor);
    
$image->setImageFormat("png");
    
$image->drawImage($draw);

    
header("Content-Type: image/png");
    echo 
$image->getImageBlob();
}

?>