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

Request #2450 Drop Shadows
Submitted: 2004-10-04 15:54 UTC
From: se at hexatex dot de Assigned:
Status: Open Package: Image_Text
PHP Version: 4.3.8 OS:
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: se at hexatex dot de
New email:
PHP Version: Package Version: OS:

 

 [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