Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewgjohnson/imagegradientrectangle
imagegradientrectangle is a function that will draw a gradient filled rectangle on your PHP GD images.
https://github.com/andrewgjohnson/imagegradientrectangle
composer gd graphics image images php
Last synced: 3 months ago
JSON representation
imagegradientrectangle is a function that will draw a gradient filled rectangle on your PHP GD images.
- Host: GitHub
- URL: https://github.com/andrewgjohnson/imagegradientrectangle
- Owner: andrewgjohnson
- License: mit
- Created: 2018-12-09T00:48:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T19:01:04.000Z (5 months ago)
- Last Synced: 2024-09-28T08:41:30.474Z (3 months ago)
- Topics: composer, gd, graphics, image, images, php
- Language: PHP
- Homepage: https://imagegradientrectangle.agjgd.org
- Size: 1.72 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
# imagegradientrectangle
[![MIT License](https://img.shields.io/badge/license-MIT-0366d6.png?colorB=0366d6&style=flat-square)](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/LICENSE)
[![Current Release](https://img.shields.io/github/release/andrewgjohnson/imagegradientrectangle.png?colorB=0366d6&style=flat-square&logoColor=white&logo=github)](https://github.com/andrewgjohnson/imagegradientrectangle/releases)
[![Contributors](https://img.shields.io/github/contributors/andrewgjohnson/imagegradientrectangle.png?colorB=0366d6&style=flat-square&logoColor=white&logo=github)](https://github.com/andrewgjohnson/imagegradientrectangle/graphs/contributors)
[![Packagist Downloads](https://img.shields.io/packagist/dt/andrewgjohnson/imagegradientrectangle.png?colorB=0366d6&style=flat-square&logoColor=white&logo=packagist)](https://packagist.org/packages/andrewgjohnson/imagegradientrectangle/stats)
[![Issues](https://img.shields.io/github/issues/andrewgjohnson/imagegradientrectangle.png?colorB=0366d6&style=flat-square&logoColor=white&logo=github)](https://github.com/andrewgjohnson/imagegradientrectangle/issues)
[![Patreon](https://imagegradientrectangle.agjgd.org/documentation/imagegradientrectangle.agjgd.org/images/patreon-badge.png)](https://patreon.com/agjopensource)## Description
**imagegradientrectangle** is a function that will draw a gradient filled rectangle on your PHP GD images.
[![Patreon - Become a Patron](https://raster.shields.io/badge/Patreon%20-become%20a%20Patron-FD334A.png?style=for-the-badge&logo=patreon&logoColor=FD334A)](https://patreon.com/agjopensource)
**imagegradientrectangle** is an [agjgd](https://agjgd.org) project.
## Usage
### With Composer
This project offers support for the [Composer](https://getcomposer.org/) dependency manager. You can find the imagegradientrectangle package online on [packagist.org](https://packagist.org/packages/andrewgjohnson/imagegradientrectangle).
#### 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](http://php.net/manual/function.include.php) to the [`imagegradientrectangle.php` source file](https://raw.githubusercontent.com/andrewgjohnson/imagegradientrectangle/master/source/imagegradientrectangle.php).
include_once 'source/imagegradientrectangle.php';
## Examples
// 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);There are [other examples](https://github.com/andrewgjohnson/imagegradientrectangle/tree/master/examples) included in the GitHub repository and on [imagegradientrectangle.agjgd.org](https://imagegradientrectangle.agjgd.org/examples/).
## Help Requests
Please post any questions in the [discussions area](https://github.com/andrewgjohnson/imagegradientrectangle/discussions) on GitHub if you need help.
If you discover a bug please [enter an issue](https://github.com/andrewgjohnson/imagegradientrectangle/issues/new) on GitHub. When submitting an issue please use our [issue template](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/ISSUE_TEMPLATE.md).
## Contributing
Please read our [contributing guidelines](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/CONTRIBUTING.md) if you want to contribute.
You can contribute financially by becoming a [patron](https://patreon.com/agjopensource) at [patreon.com/agjopensource](https://patreon.com/agjopensource) to support imagegradientrectangle and [other agjgd.org projects](https://agjgd.org/projects/).
[![Patreon - Become a Patron](https://raster.shields.io/badge/Patreon%20-become%20a%20Patron-FD334A.png?style=for-the-badge&logo=patreon&logoColor=FD334A)](https://patreon.com/agjopensource)
## Acknowledgements
This project was started by [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson).
Full list of contributors:
* [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson)Our [security policies and procedures](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/.github/SECURITY.md) comes via the [atomist/samples](https://github.com/atomist/samples/blob/master/SECURITY.md) project. Our [issue templates](https://github.com/andrewgjohnson/imagegradientrectangle/tree/master/.github/ISSUE_TEMPLATE) comes via the [tensorflow/tensorflow](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) project. Our [pull request template](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/.github/PULL_REQUEST_TEMPLATE.md) comes via the [stevemao/github-issue-templates](https://github.com/stevemao/github-issue-templates) project. The [mountains photo](https://unsplash.com/photos/qJvpykJ5SKs) comes via [Gabriel Garcia Marengo](https://unsplash.com/@gabrielgm).
## Changelog
You can find all notable changes in the [changelog](https://github.com/andrewgjohnson/imagegradientrectangle/blob/master/CHANGELOG.md).