circle — Draw a circle
Description
public Intervention\Image\Image circle(string $color, integer $x, integer $y, [integer $radius, [boolean $filled]])
Draw a colored circle at given x, y, coordinates with given radius. You can define whether the circle should be filled or not.
Parameters
color
The color of the circle. Pass a color in one of the different color formats.
pos_x
x-coordinate of the center.
pos_y
y-coordinate of the center.
radius (optional)
radius of the circle. Default: 10
filled (optional)
Whether to fill the circle or not. Default: true
Return Values
Instance of Intervention\Image\Image
Examples
// create empty canvas with background color
$img = Image::canvas(100, 100, '#ddd');
// draw a filled blue circle
$img->circle('#0000ff', 50, 50, 25);
// draw a non-filled red circle
$img->circle('#ff0000', 50, 50, 75, false);
See also
当前内容版权归 intervention 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 intervention .