Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagerectangle(3) [php man page]

IMAGERECTANGLE(3)							 1							 IMAGERECTANGLE(3)

imagerectangle - Draw a rectangle

SYNOPSIS
bool imagerectangle (resource $image, int $x1, int $y1, int $x2, int $y2, int $color) DESCRIPTION
imagerectangle(3) creates a rectangle starting at the specified coordinates. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $x1 - Upper left x coordinate. o $y1 - Upper left y coordinate 0, 0 is the top left corner of the image. o $x2 - Bottom right x coordinate. o $y2 - Bottom right y coordinate. o $color - A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Simple imagerectangle(3) example <?php // Create a 200 x 200 image $canvas = imagecreatetruecolor(200, 200); // Allocate colors $pink = imagecolorallocate($canvas, 255, 105, 180); $white = imagecolorallocate($canvas, 255, 255, 255); $green = imagecolorallocate($canvas, 132, 135, 28); // Draw three rectangles each with its own color imagerectangle($canvas, 50, 50, 150, 150, $pink); imagerectangle($canvas, 45, 60, 120, 100, $white); imagerectangle($canvas, 100, 120, 75, 160, $green); // Output and free from memory header('Content-Type: image/jpeg'); imagejpeg($canvas); imagedestroy($canvas); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Simple imagerectangle() example PHP Documentation Group IMAGERECTANGLE(3)

Check Out this Related Man Page

IMAGEFILLEDRECTANGLE(3) 						 1						   IMAGEFILLEDRECTANGLE(3)

imagefilledrectangle - Draw a filled rectangle

SYNOPSIS
bool imagefilledrectangle (resource $image, int $x1, int $y1, int $x2, int $y2, int $color) DESCRIPTION
Creates a rectangle filled with $color in the given $image starting at point 1 and ending at point 2. 0, 0 is the top left corner of the image. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $x1 - x-coordinate for point 1. o $y1 - y-coordinate for point 1. o $x2 - x-coordinate for point 2. o $y2 - y-coordinate for point 2. o $color - The fill color. A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 imagefilledrectangle(3) usage <?php // Create a 55x30 image $im = imagecreatetruecolor(55, 30); $white = imagecolorallocate($im, 255, 255, 255); // Draw a white rectangle imagefilledrectangle($im, 4, 4, 50, 25, $white); // Save the image imagepng($im, './imagefilledrectangle.png'); imagedestroy($im); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : imagefilledrectangle() PHP Documentation Group IMAGEFILLEDRECTANGLE(3)
Man Page

15 More Discussions You Might Find Interesting

1. OS X (Apple)

Just Got A New iMAC G5 !!!

Hi! I just got a new iMAC G5 (20") and I love it!!!! Amazon dropped the price $200, and there was also a $150 rebate, making it around $1325, so I could not resist anymore Finally!!!! Neo (2 Replies)
Discussion started by: Neo
2 Replies

2. UNIX for Dummies Questions & Answers

Lookup with a file

Hi All, i have a variable which has a value in it. RETAILER='JEWL' i have a text file. Name: file.txt file.txt ________ WLG 150 JEWL 60 CVS 240 FLN 120 WND 120 I am trying to write a korn script.the script, based on the value in the RETAILER will do a look up against the... (5 Replies)
Discussion started by: pavan_test
5 Replies

3. Shell Programming and Scripting

need a quick basic shell script help

im trying to run the below if command ifconfig -a |grep 10.100.120.21 gives me below output inet addr:10.100.120.21 Bcast:10.100.120.255 Mask:255.255.255.0 i just want a basic shell which says if above exists then continue how would i do this? (6 Replies)
Discussion started by: eb222
6 Replies

4. Shell Programming and Scripting

length between 100 and 150

how to locate lines longer than 100 and smaller than 150 characters using sed and grep??? (7 Replies)
Discussion started by: n_red_devils
7 Replies

5. Shell Programming and Scripting

Print a key with its all values using awk/others

input COL1 a1 b1 c1 d1 e1 f1 C1 10 10 10 100 100 1000 C2 20 20 200 200 200 2000 output C1 a1 10 1 C1 b1 10 1 C1 c1 10 1 C1 d1 100 2 C1 e1 100 2 C1 f1 1000 3 C2 ... (12 Replies)
Discussion started by: ruby_sgp
12 Replies

6. Shell Programming and Scripting

Print duplicate only lines as normal output - Awk

input output a1 100 200 XYZ_X a1 98 188 ABC (2 Replies)
Discussion started by: quincyjones
2 Replies

7. Programming

Finding range of values in an array

I have an array containing distances in ascending order, for example: distances = 100 120 150 170 200 280 300 .... I have a number, let's say v = 170 and a variation value, let's say var = 100 . I want to return the array indexes for which the distances cover the range (v - var) to (v +... (3 Replies)
Discussion started by: kristinu
3 Replies

8. UNIX for Dummies Questions & Answers

Need help filling in ranges

I have a list of about 200,000 lines in a text file that look like this: 1 1 120 1 80 200 1 150 270 5 50 170 5 100 220 5 300 420 The first column is an identifier, the next 2 columns are a range (always 120 value range) I'm trying fill in the values of those ranges, and remove... (4 Replies)
Discussion started by: knott76
4 Replies

9. Shell Programming and Scripting

script for remove descending order number

hi all i want to remove some descending order number example : 1 100 200 135.00 Gk_wirs 1 1 100 200 136.00 Gk_wirs 50 1 110 210 138.00 Gk_wirs 60 1 100 200 136.00 Gk_wirs 57 ----> how to remove... (6 Replies)
Discussion started by: nithyanandan
6 Replies

10. Shell Programming and Scripting

Inserting blank lines after string change

My input data looks like this ... -150 120 8 -150 122 7 -150 124 11 -150 126 8 -150 128 19 -150 130 13 -150 132 26 -150 134 38 -150 136 45 -150 138 62 -150 140 75 -150 142 110 -150 144 139 -150 146 138 -150 148 158 -150 150 173 -150 152 217 (5 Replies)
Discussion started by: chrisjorg
5 Replies

11. Shell Programming and Scripting

Command getting skipped

Hi All, Its been a long time!!!!!! Having one problem in our live server.... we have perl code which runs every day for almost 15 to 18hrs process and it creates almost 150 to 200 sub process (arc get) sequentially. However in which randomly one or few of the process getting skipped. But... (2 Replies)
Discussion started by: Shahul
2 Replies

12. Shell Programming and Scripting

In a row, replace negative sign and find minimum value among four columns

Hi Friends, I have an input file like this chr1 100 200 1 2 3 4 chr1 150 200 4 5 6 7 chr2 300 400 9 6 7 1 chr2 300 410 -10 21 -11 13 chr3 700 900 -21 -22 130 165 Now, my output file is chr1 100 200 1 chr1 150 200 4 chr2 300 400 1 chr2 300 410 10 chr3 700 900 21 Remove... (5 Replies)
Discussion started by: jacobs.smith
5 Replies

13. Shell Programming and Scripting

awk fatal:division by zero attempted bypass with a condtion

Hi Friends, My input chr1 100 200 1234E-02 0.01 0.05 10 chr1 100 200 14E-11 0.11 0.50 1 chr1 100 200 134E-22 0.00 0.65 111 My command awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$13}' input | awk '{v=($5/$6); print $0"\t"v}' OFS="\t" | awk '{$8=(log($8)/log(2)); print $0}'... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

14. UNIX for Dummies Questions & Answers

Sorting numerically considering both negative and positve numbers

Dear Experts, I have an IP file which looks like below ---- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 2.05 200 300 3.01 200 300 -5.06 I want an OP which looks like (decreasing numerically)-- 100 200 5.02 100 200 -2.99 100 200 -3.01 200 300 3.01 200 300 2.05 200 300 -5.06 (2 Replies)
Discussion started by: Indra2011
2 Replies

15. UNIX for Beginners Questions & Answers

Find duplicates in file with line numbers

Hello All, This is a noob question. I tried searching for the answer but the answer found did not help me . I have a file that can have duplicates. 100 200 300 400 100 150 the number 100 is duplicated twice. I want to find the duplicate along with the line number. expected... (4 Replies)
Discussion started by: vatigers
4 Replies