[Main]
Title=How does BitmapGet work?

[Top]
<TABLE CELLPADDING="4"><TR><TD VALIGN="TOP"><B>Q:</B></TD><TD>
Can you give me info on how <A HREF="$$LINK(graph.h/BitmapGet)">BitmapGet</A> works.
I've tried  everything that I know and I still get protected memory errors. The
manual just doesn`t give anything solid to base a few lines of code on.
</TD></TR><TR><TD VALIGN="TOP"><B>A:</B></TD><TD>
You probably didn't allocate enough space to store a bitmap.
The simplest way to do so is given in this example (called "Bitmap Test"):
$$EXAMPLE(Bitmap Test.c)
Note that this is just an example: for saving/restoring the whole screen,
the functions <A HREF="$$LINK(graph.h/LCD_save)">LCD_save</A> and
<A HREF="$$LINK(graph.h/LCD_restore)">LCD_restore</A> are much more efficient!
Moreover, <I>buffer</I> will probably be allocated using
<A HREF="$$LINK(alloc.h/malloc)">malloc</A> in a more realictic example.
</TD></TR></TABLE>
