Zipit Gfx

Revision as of 14:21, 27 October 2011 by Peter Huewe (talk | contribs) (it's own -> its own)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

zipitgfx 0.0.1

zipitgfx is a tiny little graphics library to do some rudimentary drawing to a Zipit's framebuffer. For now, the useful graphics functions are:

  • Drawing to pixels (writePixel())
  • Drawing lines (drawLine())
  • Drawing single text characters (drawChar())
  • Drawing text strings (drawText())
  • Drawing filled rectangles (fillRect())
  • Loading and drawing bitmaps (loadBitmap(), drawBitmap())

Most of the code is commented, and it's not very long so it should be fairly easy to extend the functionality of this library. Also, there's plenty of room for optimization that can be done to speed up the pixel drawing. It works well enough though for now. (fillRect takes up a lot of speed, as does bitmap drawing... If anyone feels like doing any optimizations, that'd be greatly appreciated)

Build Instructions

It's necessary to edit the first line of the "Makefile" included. Change the "$(CC)=...." to point to your ARM/uclibc/whatever toolchain's version of GCC. After that, a simple "make" should suffice. Make sure to copy both the "logo.bmp" file and the "zipitgfx_sample" files are in the same directory when you run zipitgfx_sample.


A sample program has been included that demonstrates all of the functionality outlined above. If you want to see how to use the zipitgfx library, looking at this program's code is the best way. Start looking at the "main()" function at the bottom to see how each function call works. This sample program is also probably a good base for any graphical Zipit programs, as it already has some keyboard input code in it and a render loop. (Use the "W/A/S/D" keys to move one endpoint of the line around.)


This code/library is released under the GPL. If anyone feels like contributing back any changes they make, that'd be nice... :)

Email: gamegod [at] sympatico |dot| ca

Copyright 2006 Albert Santoni

So that's pretty much it... I've been slowly hacking away at a little graphical ZipIt app over the past year, and I ended up abstracting the graphics stuff into its own "library"...

I hope that this helps some people with ZipIt graphics-related stuff. The sample app is actually a stripped down version of my bigger app, so I figure it's probably a good template/base for any graphical ZipIt app if you want to try developing one. (It's got keyboard input already coded into it...)

Lastly, you can download zipitgfx from my site here: