Portrety Uliczne Nieznajomych - zobacz wyjątkową galerię portretów z warszawskich ulic
ZALOGUJ SIĘ
login:
hasło:
przypomnij hasło
załóż konto użytkownika
(i zobacz kilka porad gratis)
   
WYSZUKIWARKA I DZIAŁY
całe porady  tytuły
zaznacz działy do przeszukania
(brak wyboru = wszystkie działy)
PHP
MySQL >
PostgreSQL
SQLite
Perl
Java
XML
XSLT
XPath
WML
SVG
RegExp
Wyszukiwarki
Ochrona
VBScript
Google Plus
XHTML/CSS
JavaScript
Grafika
Flash
Photoshop
Windows
Linux
Bash
Apache
Procmail
E-biznes
Explorer
Opera
Firefox
Inne porady
   
KURSY, DOKUMENTACJE
Własne:
XHTML/CSS
JavaScript
ActionScript
WML, RSS, SSI
Pozostałe:
PHP
MySQL
Java API
więcej...
   
użytkowników online: 17
W CZYM MOGĘ POMÓC?


   
OPINIE UŻYTKOWNIKÓW
Po wysłaniu do Dariusza problemu jeszcze nie opisanego w poradach, odpowiedź pojawia się na stronach już po 24 godzinach. To jedna z najważniejszych zalet serwisu! Za około 100 złotych rocznie mam profesjonalnego i doświadczonego konsultanta od technologii internetowych! Polecam serwis z poradami każdemu webmasterowi, niezależnie od stażu pracy i umiejętności.

Paweł Kowalski
grupa hiperMEDIA.pl

   
GALERIA FOTOGRAFII
   
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net

[Spis] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [X] [W] [Z]

imagerectangle

(PHP 3, PHP 4, PHP 5)

imagerectangle -- Draw a rectangle

Description

int imagerectangle ( resource image, int x1, int y1, int x2, int y2, int col )

imagerectangle() creates a rectangle of color col in image image starting at upper left coordinate x1, y1 and ending at bottom right coordinate x2, y2. 0, 0 is the top left corner of the image.




User Contributed Notes

matt at bargolf dot net
30-Jan-2006 11:25

Lets not do it Mr Benson's way OK!

I'm sure if I had to draw a 10x10 grid on paper I wouldn't do it by drawing 100 individual squares, redrawing nearly half of the lines twice.

I'd probably do it by drawing 11 vertical lines and 11 horizontal lines.

function ImageGrid2(&$im,$startx,$starty,$width,$height,$xcols,$yrows,&$color) {
   $endy = $starty + $height * $yrows;
   for ( $x=0; $x <= $xcols; $x++ ) {
       $x1 = $startx + $width * $x;
       imageline ( $im, $x1, $starty, $x1, $endy, $color );
   }

   $endx = $startx + $width * $xcols;
   for ( $y=0; $y <= $yrows; $y++ ) {
     $y1 = $starty + $height * $y;
     imageline ( $im, $startx, $y1, $endx, $y1, $color );
   }
}


Gros
09-Jan-2006 05:33

1 rectangle = 4 lines.
It's easier...


eustaquiorangel at yahoo dot com
17-Dec-2002 06:21

If you want an empty rectangle, I mean, just the borders, fill it first with the ImageFilledRectangle function with the background color and then draw it with this function.


jbenson at technologist dot com
28-Nov-2000 07:41

For those wanting a function to draw a grid I've created one.  I hope this is the right place to post it.

function ImageGrid(&$im,$startx,$starty,$width,$height,$xcols,$yrows,&$color) {

for ( $x=0; $x < $xcols; $x++ ) {
   for ( $y=0; $y < $yrows; $y++ ) {
     $x1 = $startx + ($width * $x);
     $x2 = $startx + ($width * ($x+1));
     $y1 = $starty + ($height * $y);
     $y2 = $starty + ($height * ($y+1));
     ImageRectangle($im, $x1, $y1, $x2, $y2, $color);
   }
}

} // end function ImageGrid


 

 
  © 1996-2012 & Reporter.plmiejscao serwisieabonamentwarunki korzystaniaRSSkontakt