# Gadget Developer Guide - Classes - SuperBitmap

## Overview

The SuperBitmap is possibly the most versatile of Woopsi's gadgets. It provides the developer with a canvas that can be attached to windows or screens and drawn on using a set of basic drawing functions - lines, rectangles, etc. Bitmap images can also be drawn directly onto the SuperBitmap's canvas.

The SuperBitmap has a couple of other handy features. The SuperBitmap's canvas can be larger than the actual gadget - it is possible to have a 100x100 window containing a 50x50 SuperBitmap gadget, and the SuperBitmap gadget can contain a bitmap canvas that is 500x500 pixels wide. Clicking the SuperBitmap gadget with the stylus and dragging it scrolls the canvas within the gadget's confines, making the gadget a viewport into a much larger space.

Unlike standard windows and gadgets, the SuperBitmap retains anything drawn to it. It is possible (though inadvisable) to draw directly to screens, windows and gadgets, but any such drawing activity will be lost as soon as a screen refresh occurs. SuperBitmaps store their bitmaps in a block of RAM outside of the DS's video memory, so any screen refreshes automatically restore the latest image to the screen.

## Usage Ideas

Here are a few possible uses that the SuperBitmap can be put to:

- Display surface for window-based games
- Image viewer for bitmaps larger than the DS' screens
- Background images for screens and windows
- Canvas for a paint program