Working Prototype : Dashed border drawing

I just completed having a working prototype . The code is right now just straight flow to allow easy tweaking .

Some timing notes :

width=800.0
height=600.0
borderSizes=[50.0,50.0,50.0,50.0]
borderRadii=[[300.0,300.0],[100.0,100.0],[100.0,100.0],[100.0,100.0]]

The cairo initialization and writing surface to png [the boilerplate] take :

anil@anil-Studio-1558:~$ time python GSoC\ -\ Mozilla/boilerplate.py 

real	0m0.088s
user	0m0.080s
sys	0m0.004s

The program takes somewhere between 86ms to 100ms

anil@anil-Studio-1558:~$ time python GSoC\ -\ Mozilla/ver2.py

real 0m0.101s
user 0m0.096s
sys 0m0.004s

Somethings left to do :
The code right now has two seperate sections to draw the clockwise and anticlockwise sections [ I actually copy pasted and edited 🙂 ] . That would be integrated into single function.

Sample Output [Output is for the input conditions put above] :

The code can be viewed / downloaded from here .

Advertisements

About anil

science is my passion so im here for it
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s