>How can I draw a single point with Palm OS API?
>I can do it only through video buffer. Is there any API function to do so?

The 3.5 API includes new calls for setting/getting individual pixels. 
Here are the relevant routines from Window.h:

IndexedColorType WinGetPixel (Coord x, Coord y);
void WinPaintPixel (Coord x, Coord y);  // uses drawing mode
void WinDrawPixel (Coord x, Coord y);
void WinErasePixel (Coord x, Coord y);
void WinInvertPixel (Coord x, Coord y);
void WinPaintPixels (UInt16 numPoints, PointType pts[]);

On pre-3.5 systems, you can use WinDrawLine(inX, inY, inX, inY) to 
draw a black pixel, and WinEraseLine(inX, inY, inX, inY) to draw a 
white pixel.

If you need more speed, then you can directly hit video memory, 
though you need to worry about the device being in 2 or 4bpp mode, 
and correctly supporting this is a bit tricky.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
  • Dr... Созин Борис
    • ... Nick Hammond
    • ... Ken Krugler
    • ... Созин Борис
    • ... Aaron Ardiri

Reply via email to