GmagickDraw::rectangle

(PECL gmagick >= Unknown)

GmagickDraw::rectangle矩形を描く

説明

public GmagickDraw::rectangle(
    float $x1,
    float $y1,
    float $x2,
    float $y2
): GmagickDraw

二つの座標を指定して、現在の描画色と線幅そして塗りつぶし設定を使った矩形を描きます。

パラメータ

x1

最初の x 座標。

y1

最初の y 座標。

x2

二番目の x 座標。

y2

二番目の y 座標。

戻り値

GmagickDraw オブジェクトを返します。

add a note

User Contributed Notes 1 note

up
0
vitalick dot pugach at gmail dot com
9 years ago
Создаем белый прямоугольник внизу изображения. [Create a white rectangle at the bottom of the image.]$image = "http://localhost/files/upload/399000/399357/cmsimage8KEGF3.jpg";list($width, $height) = getimagesize($image);$gmagicDraw = new GmagickDraw();$gmagicDraw->setfillcolor("#fff");$gmagicDraw->rectangle(0, $height - $height * 0.02, $width, $height);$gImage = new Gmagick();$gImage->readImage($image);$gImage->drawimage($gmagicDraw);$gImage->writeimage(DOCROOT . "files/temp/img". $someId);
To Top