Phwoar...! Making your own extensive graphics library is so much more complex than assigning pixel values.
I personally highly recommend you don't approaching this [read: create custom library] at...