Hi Mike,

Unless anyone knows better, you're into the realms of direct screen access,
with all the usual "on your head be it" warnings about compatibility with
future Palms. Anyway, here's the code I've been using successfully recently:

unsigned int *GetWindowBase(WinHandle wh)
{
 WinPtr winptr = WinGetWindowPointer(wh);
 return (unsigned int *)(winptr->displayAddrV20);
}

void DrawPoint(int x,int y)
{
 unsigned int *windata = GetWindowBase(WinGetDrawWindow());
 windata[y*10 + (x>>4)] |= 1 << (15 - (x&15));
}

---
Notes:
1. Don't plot a point that's not on the screen (0,0)->(159,159) or you'll be
writing into random memory.
2. This relies on the screen being 160 pixels wide with 1 bit per pixel
(black and white), giving 10 words per scanline.
3. Further gains can be had by calculating 'windata' once and then passing
it into DrawPoint.

Hope that helps! It's a bit low level, so I can't be held responsible for
the consequences (run it on POSEr first)
:oP

Seeya,
David
---
David Oakley - [EMAIL PROTECTED] - ICQ 9610512
partner, Astraware - http://www.astraware.com/
New: Zap! for PalmPilot: http://www.astraware.com/palm/zap/?dsig

----- Original Message -----
From: Mike Davis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 24 September 1999 17:20
Subject: Plotting Points to Display - Slow....


> What is the best way to plot points to the palm display
> that produces graph, curves, etc that is reasonably fast.
>
> I have tried using the WinDraw routines that this produces
> very slow screen draws.  Is there a faster way?
>
> These seem like very wasteful routines to turn on and off
> pixels.  Is there anything that can turn pixels on and off that
> is fast?
>
> Thanks
>
> Mike
> --
> -----------------------------------------------------------------
> Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/
>
> Protect your constitutional rights. Your favorite one may be next!
> -----------------------------------------------------------------
>

Reply via email to