Jump to content

imagefilledrectangle - Texture / Pattern ?


ttmt

Recommended Posts

 

Hi all

 

I have this simple gd code to produce a filled rectangle with a solid color.

 

<?php
        
header('Content-Type: image/png');

$im = imagecreatetruecolor(1000, 200);

$gray = imagecolorallocate($im, 240, 240, 240);
imagefilledrectangle($im, 0, 0, 1000, 199, $gray);
    

imagepng($im);

imagedestroy($im);

?>

 

Is it possible to create a rectangle with a pattern such as a lined background.

Link to comment
https://forums.phpfreaks.com/topic/250736-imagefilledrectangle-texture-pattern/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.