PHP: imagefilledrectangle 您所在的位置:网站首页 img/x2.gif PHP: imagefilledrectangle

PHP: imagefilledrectangle

2024-07-10 12:41| 来源: 网络整理| 查看: 265

imagefilledrectangle

(PHP 4, PHP 5, PHP 7, PHP 8)

imagefilledrectangle — 绘制矩形并填充

说明 imagefilledrectangle(    GdImage $image,    int $x1,    int $y1,    int $x2,    int $y2,    int $color): bool

在指定 image 中创建一个从点 1 开始到点 2 结束的的矩形并填充 color。0, 0 是图像的左上角。

参数

image

由图象创建函数(例如imagecreatetruecolor())返回的 GdImage 对象。

x1

点 1 的 x 坐标。

y1

点 1 的 y 坐标。

x2

点 2 的 x 坐标。

y2

点 2 的 y 坐标。

color

填充颜色。颜色标识符使用 imagecolorallocate() 创建。

返回值

成功时返回 true, 或者在失败时返回 false。

更新日志 版本 说明 8.0.0 image 现在需要 GdImage 实例;之前需要有效的 gd resource。 示例

示例 #1 imagefilledrectangle() 用法

以上示例的输出类似于:

示例输出:imagefilledrectangle()


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有