> What I do is this, capture pen movements, when done convert to a bitmap
and
> save to a db for future use if needed. Then (since I dont know anything
> about palm bit maps) I am grabbing the data from the gadget one pixel at a
> time and building a string representation of the gadget data ... for
example
Hello!
This seems to be not very effective approach. I made the same thing recently
and here is what I did:
I created 2 arrays:
one of size [Drawing_field_Size_X * Drawing_field_Size_X / 8] (I use 1bpp
scheme)
and another one of size [Drawing_field_Size_X * Drawing_field_Size_X *
sizeof(unsigned char)]. This will be the list of points.
When the user draws a point, I get penDownEvent or penMoveEvent.
I mark the point in first array, and if the point was not marked before(!),
I add it's coords to the list of points. This way I need to transfer the
sequence of points, and not a bitmap. For my needs such approach appeared to
be much more effective. However RLE won't help in this case -- the sequence
is almost not compressable.
--
Sincerely yours,
Eugene Mayevski
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/