theseconddre / pattern-creator
Generates a specific customisable pattern with php GD
dev-master
2020-02-02 17:58 UTC
This package is not auto-updated.
Last update: 2025-09-16 20:12:26 UTC
README
Generates a specific, customisable & graphic pattern with php GD.
How to install my package? :-)
Very easy: Just add the following line to your require block in composer.json
"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)
<?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.