Bitjuice - Ajax Patterns

Bitjuice

From Ajax Patterns

This is the home for Bitjuice.

Contents

BitJuice

bitjuicedx1.png

Bitjuice is an Ajax/Javascript bitmap library for Raster/Bitmap graphics in Javascript. Based on HTML tables, it works in all major browsers, old and new. By Michael Mahemoff, released under MIT License. Media:Example.ogg

Headline text

Demos

You'll find demos at this bitjuice demo page and its descendent directories. In particular, this scratchpad demo lets you experiment with coding against the library.

Code Examples

 *** BASIC USAGE ***
 var bitmap = new Bitmap(10,20); // width, height
 containerElement.appendChild(bitmap);
 bitmap.drawPoint(5,5,"pink"); // x,y,html colour
 *** ADVANCED USAGE ***
 var bitmap = new Bitmap(10,20, {container:containerElement, blankColor:"gray"});
 bitmap.drawLine(1,2,5,5,"pink");
 bitmap.drawRect(1,2,5,5,"pink");
 bitmap.drawFilledRect(1,2,5,5,"pink");
 bitmap.destroy(); // Same as containerElement.removeChild(bitmap);