note 40665 added to function.pdf-rect

From: Date: Wed, 10 Mar 2004 23:38:12 +0000
Subject: note 40665 added to function.pdf-rect
Groups: php.notes 
Request: Send a blank email to php-notes+get-66589@lists.php.net to get a copy of this message
To draw a Filled Rectangle, with coordinates in millimeters I use this function: function rectangulo($pdf,$x1,$y1,$x2,$y2) { global $alto; pdf_setcolor($pdf, "fill", "rgb", 0.9, 0.9, 0.9); pdf_setcolor($pdf, "stroke", "rgb", 0, 0, 0); pdf_moveto($pdf, $x1*2.83502, $alto-$y1*2.83502); pdf_lineto($pdf, $x2*2.83502, $alto-$y1*2.83502); pdf_lineto($pdf, $x2*2.83502, $alto-$y2*2.83502); pdf_lineto($pdf, $x1*2.83502, $alto-$y2*2.83502); pdf_lineto($pdf, $x1*2.83502, $alto-$y1*2.83502); pdf_fill_stroke($pdf); } Where $alto is the height of the Page (842 for A4), I need this because PDF uses coordinates bottom to top, and I like top to bottom. ---- Manual Page -- http://www.php.net/manual/en/function.pdf-rect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40665 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40665&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40665&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66589) next »