Download the PHP package redeyeventures/geopattern without Composer

On this page you can find all versions of the php package redeyeventures/geopattern. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geopattern

GeoPattern Build Status

Latest Version Latest unstable Version

This is a PHP port of jasonlong/geo_pattern.

Generate beautiful tiling SVG patterns from a string. The string is converted into a SHA and a color and pattern are determined based on the values in the hash. The color is determined by shifting the hue and saturation from a default (or passed in) base color. One of 16 patterns is used (or you can specify one) and the sizing of the pattern elements is also determined by the hash values.

You can use the generated pattern as the background-image for a container. Using the base64 representation of the pattern still results in SVG rendering, so it looks great on retina displays.

See the GitHub Guides site as an example of what this library can do. (GitHub Guides uses the original ruby version).

Installation

Run this command in your root project:

Installation (without composer)

Download or clone the src directory from GitHub.

Rename the src folder to GeoPattern and put it somewhere your app can access it from.

Add this line to your code:

require_once('path/to/folder/geopattern_loader.php');

You can then follow the usage instructions below.

Usage

Make a new pattern:

$geopattern = new \RedeyeVentures\GeoPattern\GeoPattern();
$geopattern->setString('Mastering Markdown');

To specify a base background color (with a hue and saturation that adjusts depending on the string):

$geopattern->setBaseColor('#ffcc00');

To use a specific background color (w/o any hue or saturation adjustments):

$geopattern->setColor('#ffcc00');

To use a specific pattern generator:

$geopattern->setGenerator('sine_waves');

Get the SVG string:

$svg = $geopattern->toSVG();

Get the Base64 encoded string:

$base64 = $geopattern->toBase64();

Get a data URI:

$dataURI = $geopattern->toDataURI(); #data:image/svg+xml;base64,...

Get a data URL:

$dataURL = $geopattern->toDataURL(); #url("data:image/svg+xml;base64,...")

You can use the data URL string to set the background:

<div style="background-image: {$dataURL)"></div>

The setString, setBaseColor, setGenerator methods are chainable. You can also pass an array to the GeoPattern constructor containing the string, baseColor, color, and/or generator values.

If the GeoPattern object is cast as a string, it will provide the SVG string.

Contributing

  1. Fork it ( http://github.com/redeyeventures/geopattern-php/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Original Project

See https://github.com/jasonlong/geo_pattern for more info and links to ports for other languages.

Based on jasonlong/geo_pattern @ ac27b5bb50a8d2061ff63254c915e9ca96a40480.


All versions of geopattern with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package redeyeventures/geopattern contains the following files

Loading the files please wait ....