ellipse — Draw an ellipse
Description
public Intervention\Image\Image ellipse(mixed $color, int $pos_x, int $pos_y, [int $width, [int $height, [boolean $filled]]])
Draw a colored ellipse at given x, y, coordinates. You can define width and height and whether the ellipse should be filled or not.
Parameters
color
The color of the ellipse. Pass a color in one of the different color formats.
pos_x
x-coordinate of the center.
pos_y
y-coordinate of the center.
width (optional)
width of the ellipse. Default: 10
height (optional)
The ellipse height. Default: 10
filled (optional)
Whether to fill the ellipse 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 ellipse
$img->ellipse('#0000ff', 50, 50, 25, 50);
// draw a non-filled red ellipse
$img->ellipse('#ff0000', 50, 50, 75, 25, false);
See also
当前内容版权归 intervention 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 intervention .