Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.7.0

Request #2450 Drop Shadows
Submitted: 2004-10-04 15:54 UTC Modified: 2013-08-08 09:30 UTC
From: se at hexatex dot de Assigned: bigmichi1
Status: Closed Package: Image_Text
PHP Version: 4.3.8 OS:
Roadmaps: 0.8.0    
Subscription  


 [2004-10-04 15:54 UTC] se at hexatex dot de
Description: ------------ It would be nice to have an easy way to have drop shadows. Reproduce code: --------------- # this is what I did to emulate drop shadows, it is probably not ideal $c = 'A Headline!'; $w = 510; $h = 80; $options1 = array( 'canvas' => array('width'=> $w,'height'=> $h + 1), 'width' => $w, 'height' => $h - 10, 'line_spacing' => .4, 'color' => '#333333', 'max_lines' => 3, 'min_font_size' => 2, 'max_font_size' => 50, 'font_size' => 36, 'font_path' => LIBDIR . '/fonts/', 'font_file' => 'trebuc.ttf', 'valign' => IMAGE_TEXT_ALIGN_BOTTOM ); $options2 = $options1; $options2['color'] ='#000000'; $text1 = new Image_Text($c, $options1); $text2 = new Image_Text($c, $options2); $text1->init(); $text2->init(); $img1 =& $text1->getImg(); $img2 =& $text2->getImg(); $white = imagecolorallocate($img1, 255, 255, 255); imagefilledrectangle($img1, 0, 0, $w, $h, $white); imagefilledrectangle($img2, 0, 0, $w, $h, $white); $text1->autoMeasurize(14, 26); $text2->autoMeasurize(14, 26); $text2->render(); imagecopymerge($img1, $img2, 1, 1, 0, 0, $w, $h, 30); $text1->render(); $text1->display();

Comments

 [2013-08-08 08:46 UTC] bigmichi1 (Michael Cramer)
-Assigned To: +Assigned To: bigmichi1
 [2013-08-08 09:30 UTC] bigmichi1 (Michael Cramer)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.