andrewgjohnson / imagegradientrectangle
imagegradientrectangle 是一个函数,可以在您的 PHP GD 图像上绘制渐变填充的矩形
Requires
- php: >=5.0.0
- ext-gd: *
- andrewgjohnson/imageblendedcolorallocate: 1.*
This package is auto-updated.
Last update: 2024-09-18 19:13:02 UTC
README
描述
imagegradientrectangle 是一个可以在您的 PHP GD 图像上绘制渐变填充矩形的函数。
imagegradientrectangle 是一个 agjgd 项目。
使用方法
使用 Composer
此项目为 Composer 依赖项管理器提供支持。您可以在 packagist.org 上找到 imagegradientrectangle 包。
使用 Composer 安装
运行此命令
composer require andrewgjohnson/imagegradientrectangle
或者将以下内容添加到您的 composer.json 文件的 require 部分
"andrewgjohnson/imagegradientrectangle": "1.*"
不使用 Composer
要使用而不使用 Composer,请将以下 include 添加到 imagegradientrectangle.php 源文件。
include_once 'source/imagegradientrectangle.php';
示例
// standard method to draw a red filled rectangle
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
imagefilledrectangle($im, 10, 10, 100, 100, $red);
// standard method to draw a blue filled rectangle
$blue = imagecolorallocate($im, 0x00, 0x00, 0xFF);
imagefilledrectangle($im, 10, 10, 100, 100, $blue);
// this will draw a red-to-blue gradient filled rectangle
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0xFF);
imagegradientrectangle($im, 10, 10, 100, 100, $red, $blue);
GitHub 仓库中包含其他示例,可在 此处 和 imagegradientrectangle.agjgd.org 上找到。
求助请求
如果您需要帮助,请将任何问题发布在 GitHub 上的 讨论区域。
如果您发现一个错误,请 在 GitHub 上提交问题。提交问题时,请使用我们的 问题模板。
贡献
如果您想贡献,请阅读我们的 贡献指南。
您可以通过成为 patreon.com/agjopensource 上的 patron 来经济上支持 imagegradientrectangle 和 其他 agjgd.org 项目。
致谢
该项目由 Andrew G. Johnson (@andrewgjohnson) 创立。
贡献者完整列表
我们的 安全政策和流程 来自于 atomist/samples 项目。我们的 问题模板 来自于 tensorflow/tensorflow 项目。我们的 pull request 模板 来自于 stevemao/github-issue-templates 项目。山景照片来自 Gabriel Garcia Marengo。
变更日志
您可以在变更日志中找到所有显著的更改。