gpt4 book ai didi

php - 用 php imagemagick 画圆

转载 作者:搜寻专家 更新时间:2023-10-31 21:09:03 25 4
gpt4 key购买 nike

我只是想了解如何使用 php5 imagemagick 绘制圆的基本概念。我看过页面,http://php.net/manual/en/imagickdraw.circle.php但是那里的例子太困惑了。我只想画一个圆圈然后把它弄乱。谁能给我一个简单的 php5 imagemagick 圈子示例?

我试过:

<?php
header("Content-type: image/jpeg");
$circle = new ImagickDraw();
$draw->circle (10, 10, 60, 10);
//echo $circle;
?>

任何变体,但我画不出一个圆。

最佳答案

希望这就是您要找的:

<?php
$draw = new ImagickDraw ();
//given that $x and $y are the coordinates of the centre, and $r the radius:
$draw->circle ($x, $y, $x + $r, $y);
?>

关于php - 用 php imagemagick 画圆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25700739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com