2017 © Pedro Peláez
 

library pattern-creator

Generates a specific customisable pattern with php GD

image

theseconddre/pattern-creator

Generates a specific customisable pattern with php GD

  • Friday, August 4, 2017
  • by theseconddre
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PatternCreator

Generates a specific, customisable & graphic pattern with php GD., (*1)

Example of random pattern, (*2)

How to install my package? :-)

Very easy: Just add the following line to your require block in composer.json, (*3)

"require": {
    "theseconddre/pattern-creator": "dev-master"
}

How to use my class?

Then if you want to generate a blue pattern made of squares in your browser, just type these lines (already coded in PatternCreator/examples/index.php), (*4)

<?php 

// Example 1 : display pattern in browser
// See more examples in examples/index.php 

$pattern = new TheSecondDre\PatternCreator([
        'width'     =>  1000,
        'height'    =>  1000,
        'color'     =>  '#0000ff',
        'pattern'   =>  'square',
    ]);

$img = $pattern->createPattern('browser');
die();

Of course you can add your own pattern file in /src/img_patterns., (*5)

The Versions

04/08 2017

dev-master

9999999-dev

Generates a specific customisable pattern with php GD

  Sources   Download

Apache 2.0

by André