create(480,320); $outlinecolor = Array(255,0,0,255); $color = Array(255,127,0,255); $box = new ImlibDraw(); $box->set_image($im->get_id()); $box->set_color_array($outlinecolor); $box->draw_rectangle(7,7,106,56); $box->set_color_array($color); $box->fill_rectangle(10,10,100,50); $poly = new ImlibPoly(); $poly->new_poly(); $poly->set_image($im->get_id()); $poly->set_color(255,0,255,255); $poly->add_point(100,100); $poly->add_point(215,110); $poly->add_point(150,215); $poly->add_point(102,255); $poly->draw(); $poly->free(); $txt = new ImlibText(); $txt->set_image($im->get_id()); $txt->load('','Vera','25'); $txt->draw(250,50,"Always a Boom.",IMLIB_TEXT_TO_UP); $txt->get_size("Always a Boom.",$tw,$th,IMLIB_TEXT_TO_UP); $txt->free(); // Draw a box around the text string $box->set_color(100,100,100,255); $box->draw_line(245,50,245,50+$th); $box->draw_line(250,45,250+$tw,45); $box->draw_line(255+$tw,50,255+$tw,50+$th); $box->draw_line(250,55+$th,250+$tw,55+$th); $im->save('./dst.png'); $im->free(); ?>