phpCairo Tutorial – I
Cant stop myself from writing this post … I need to tell someone how the code will look on the php user space
Yes this tutorial is about implementing the Hello World Program
PHP Code :
$sur = new CairoImageSurface(0,400,400);
$con = new CairoContext($sur);
$con->select_font_face(”Sans”);
$con->set_font_size(50.0);
$con->set_source_rgb(0,1,0);
$con->move_to(15,75);
$con->show_text(”Hello World”);
$con->set_source_rgb(1.0, 0.0, 0.0);
$con->set_line_width(10);
$con->rectangle(10,10,350,80);
$con->stroke();
$sur->write_to_png(”try.png”);
End PHP Code
1 Comment »
Leave a comment
-
Recent
-
Links
-
Archives
- May 2009 (1)
- December 2008 (1)
- July 2008 (1)
- June 2008 (3)
- May 2008 (11)
- April 2008 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS
Wow, that’s some good work you have there. Congrats and keep it up!