ok, the direct screen access is somethink like that?!
//global variables needed - two WinHandle's
WinHandle DisplayWindowH;
WinHandle OffscreenBufferH;
//a subroutine to create the offscreen window
//you should call this once at the start of your program
void CreateDoubleBufferWindow()
{
OffscreenBufferH=WinCreateOffscreenWindow(160,160, screenFormat, &err);
}
//a routine to draw to the screen
void DrawScreen()
{
WinSetDrawWindow(OffscreenBufferH);
// Now what?! what I can do here to draw putting pixels into the
offscreenbufferh?
}
//simple routine to refresh the visible screen
void RefreshScreen()
{
RectangleType bounds;
WinSetDrawWindow(DisplayWindowH);
WinGetWindowBounds(&bounds);
WinCopyRectangle (OffscreenBufferH, 0, &bounds, 0, 0, 0);
}
-----Mensagem original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] nome de Tim
Kostka
Enviada em: quinta-feira, 6 de maio de 2004 18:51
Para: Palm Developer Forum
Assunto: Re: the fastest way to put pixels?!
As Aaron stated below, direct screen access is the fastest way to put pixels
into memory. However, it can cause problems if your pixel data and screen
data aren't the same bpp. You will either have to code your program to
detect the bpp settings or make sure the device is always in the same
setting.
If you want to go this route, look into pixel format for the different bpp
settings. Also, look at WinGetBitmap and BmpGetBits to retrieve the pixel
data for whatever window you are interested in changing.
--
Tim Kostka
http://www.nuprograms.com
"Alexandre Teodoro Guimar�es" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I gonna develop some kind of real online video for a Palm motorola series
> that receive data from a serial line and show in full screen (160x160) in
> black and white colors only (like the pionner animations sound for car).
> So I need to put pixels by the fastest way in the screen... anyone can
help
> me?!
> I try WinDrawPixel, WinPaintPixel and WinPaintPixels but I�m confused if
> have another way to put pixels in screen more fast than these.
> Please, help me guys!
>
> This is a sample part of the code.
> --------------------------------
> {
> const int pixels = 160;
> int x, y, p;
>
>
> PointType s[pixels+1];
> RGBColorType RGBColor;
> IndexedColorType color[2];
>
> RGBColor.r = 0;
> RGBColor.g = 0;
> RGBColor.b = 0;
> color[0] = WinRGBToIndex(&RGBColor); // black color
>
> RGBColor.r = 255;
> RGBColor.g = 255;
> RGBColor.b = 255;
> color[1] = WinRGBToIndex(&RGBColor); // white color
>
>
> for(x=0; x<160; x++)
> {
> p=0;
> for(y=0; y<160; y++)
> {
> WinSetForeColor(color[0]);
> // s[p].x = x;
> // s[p].y = y;
> // WinPaintPixel(x,y);
> WinDrawPixel(x,y);
> p++;
> }
>
>
> // WinPaintPixels(pixels,s);
> }
> --------------------------------
>
>
> tanks in advance,
> regards
> Atenciosamente,
> Alexandre Teodoro Guimar�es
> Analista de Sistemas
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Empresa: G&M Solu��es Ltda.
> ICQ : 282-168-268
> Msn : [EMAIL PROTECTED]
> Fone: (34) 3231-0003
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/