andrewgjohnson/imagegradientrectangle
最新稳定版本:v1.1.0
Composer 安装命令:
composer require andrewgjohnson/imagegradientrectangle
包简介
imagegradientrectangle is a function that will draw a gradient filled rectangle on your PHP GD images
关键字:
README 文档
README
Description
imagegradientrectangle is a function that will draw a gradient filled rectangle on your PHP GD images.
imagegradientrectangle is an agjgd project.
Usage
With Composer
This project offers support for the Composer dependency manager. You can find the imagegradientrectangle package online on packagist.org.
Install using Composer
Either run this command:
composer require andrewgjohnson/imagegradientrectangle
or add this to the require section of your composer.json file:
"andrewgjohnson/imagegradientrectangle": "1.*"
Without Composer
To use without Composer add an include to the imagegradientrectangle.php source file.
include_once 'source/imagegradientrectangle.php';
Dependencies
This project has external dependencies. If you use Composer you will not need to worry as dependencies are handled automatically. If you do not use Composer you will need to manage these dependencies yourself.
Dependencies List
- imageblendedcolorallocate is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images (source)
Examples
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0xFF);
// Standard method to draw solid filled rectangles
imagefilledrectangle($im, 10, 10, 100, 100, $red);
imagefilledrectangle($im, 10, 10, 100, 100, $blue);
// This will draw a red-to-blue gradient filled rectangle (vertical gradient)
imagegradientrectangle($im, 10, 10, 100, 100, $red, $blue);
// This will draw a red-to-blue gradient filled rectangle (horizontal gradient)
imagegradientrectangle($im, 10, 10, 100, 100, $red, $blue, true);
There are other examples included in the GitHub repository and on imagegradientrectangle.agjgd.org.
Help Requests
Please post any questions in the discussions area on GitHub if you need help.
If you discover a bug please enter an issue on GitHub. When submitting an issue please use our issue template.
Contributing
Please read our contributing guidelines if you want to contribute.
You can contribute financially by becoming a patron at patreon.com/agjopensource to support imagegradientrectangle and other agjgd.org projects.
Acknowledgements
This project was started by Andrew G. Johnson (@andrewgjohnson).
Full list of contributors:
Our security policies and procedures comes via the atomist/samples project. Our issue templates comes via the tensorflow/tensorflow project. Our pull request template comes via the stevemao/github-issue-templates project. The mountains photo comes via Gabriel Garcia Marengo.
Changelog
You can find all notable changes in the changelog.
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-09