Akshat Gupta

Finally invoved in Open Source :)

CairoSurface … conquered …

After some struggle with overloading the constructor in “c space” the surface class is also done…. So that make the class count to 2 but now we can draw anything on any surface … So whats left now …

There is a need to finish the pattern class and path class. Apart from that I have not implanted the functions that are new to Cairo 1.6 (‘cause I have to install it first ;)) and lot of testing on different environments.

For overloading the constructor please accept all the parameters by using the function call get_parameters() into an array of zval * … now check for all the parameters and get there corresponding data types ….

Its been a long time since I have taken a break 😉 … so signing of for an awesome weekend ….

 

May 31, 2008 Posted by | gsoc | , | 1 Comment

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

May 27, 2008 Posted by | gsoc | 1 Comment

Yes Context class … you are almost finished

After lot of frustrating moments (Hey coding is all about that) the context class is complete baring a strict testing ….
The good news is that it has passed the first test and I was able to implement the Hello World program …. 🙂
One major issue that I came across was the representation of various return values … At the moment everything is being returned as associative arrays but this can be changed if the need arises. ….
Forgetting all that it is an accomplishment so ….
Cheers !!!

May 27, 2008 Posted by | gsoc | Leave a comment

First Cairo Output

After a long break … work has been resumed.

Finally I could see the version number of phpCairo … so I am all set up now to test all the functions that I have written.

The most useless part was the deforestation of the config jungle … added the cairo library and the linking support during compilation.

So things going good for the moment except that I am a week behind my schedule .. need to work harder to compensate for it.

May 19, 2008 Posted by | gsoc | Leave a comment

Changes to phpCairo

Some changes have been made to phpCairo extensions …. the naming convention has been changed …
instead of cairoClassname it is now CairoClassname.

Added some extra features that have been supported in Cairo 1.6 to the framework.
At present clueless about the Quartz surface and win32 surface ….

May 6, 2008 Posted by | gsoc | 2 Comments

Structure Ready

Phew !!!
Finally the structure of phpCairo is ready as an XML file that is supposed to be used in PECL_codegen to generate the starting code. Now the tough part starts and finally I will be able to reply to my mentors only question … “Show me the code !!”
Writing the XML file taught me a lot about the working of Cairo and now have a broad vision of how Cairo works ….
Its now time to Fill in the Blanks ..

May 4, 2008 Posted by | gsoc | 2 Comments

My first git push :)

After some struggling I was finally able to push some thing on the git server .. repo.or.cz …
The project is http://repo.or.cz/w/phpCairo.git.

Fall backs to be avoided : use git push git+ssh://[username]@repo.or.cz/srv/git/phpCairo.git master

May 3, 2008 Posted by | gsoc | Leave a comment

pyCairo sucks

Why is pyCairo not documented … making my life miserable 😦 … have to go back to C++ for there documentation.

May 2, 2008 Posted by | Uncategorized | Leave a comment

PECL Codegen problem solved

Had to compile my php with ctype and tokenizer to get my PECL Codegen working.

May 2, 2008 Posted by | gsoc | Leave a comment

Command Meme

$ history | awk ‘ {a[$2]++ } END {for (i in a) { print a[i] ” ” i}}’ | sort -rn | head
105 ./a.out
76 gcc
56 cd
55 ls
53 sudo
34 vi
15 pecl-gen
15 gvim
13 man
8 startx

May 1, 2008 Posted by | Uncategorized | Leave a comment