nanogui@linuxhacker.org
nanogui@linuxhacker.org
Dear Greg,
I tried it and it is working fine.But it is rendering the bitmap very
very slowly.I could actually see the bitmap being rendered line by line .I
have configured Microwindows for x11.Is there any way i can make the Bitmap
rendering faster.
Best Regards
Krishnan
----- Original Message -----
From: "Greg Haerr" <greg@censoft.com>
To: <krishnan@w-o-i.com>
Cc: "nanoX-MailList" <nanogui@linuxhacker.org>
Sent: Tuesday, December 05, 2000 11:35 PM
Subject: Re: Reading and Displaying a Bitmap at runtime
> : psd = GdOpenScreen();
> :
> : GdDrawImageFromFile(psd,0,0,640,480,"zee.bmp",PSF_SCREEN|PSF_HAVEBLIT);
> :
> : GdCloseScreen(psd);
>
> First, don't call GdOpenScreen, that's long been done before
> your WinMain got called. use &scrdev for the first argument.
>
> Second, we're calling an engine function directly, which is not
> normally supported, so all of your coordinates need to be
> adjusted for the current window offset. Check out code in
> in mwin/wingdi.c to see how this is done. You might try
> looking at at SetPixel. Basically, you need to add the
> hwnd->clirect.left and hwnd->clirect.top to the x,y coords.
>
> Finally, just pass 0 for the last parm.
>
> Regards,
>
> Greg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nanogui-unsubscribe@linuxhacker.org
> For additional commands, e-mail: nanogui-help@linuxhacker.org
nanogui@linuxhacker.org