[winGRASS] Re: generic Windows GRASS driver
Malcolm Blue
mblue at nb.sympatico.ca
Thu Sep 27 06:50:07 EDT 2001
Great! Good work Mike.
I will try out these changes later in the day.
Malcolm
> -----Original Message-----
> From: Mike Thomas [mailto:miketh at brisbane.paradigmgeo.com]
> Sent: Thursday, September 27, 2001 4:38 AM
> To: Markus Neteler; Malcolm Blue
> Cc: wingrass at grass.itc.it; Glynn Clements; Roberto Flor
> Subject: Re: [winGRASS] Re: generic Windows GRASS driver
>
>
> Hi all.
>
> I'm pleased to announce that "d.rast" works - see attached png file and
> xlib.c.
>
> To do this.
>
> 1. Apply the diff I sent this morning fixing my bug from yesterday.
>
> 2. Fill out the stub for NT_XPutPixel() in xlib.c as follows;
>
> int
> NT_XPutPixel(ximage,x,y,pixel)
> XImage *ximage;
> int x,y;
> unsigned long pixel;
> {
> unsigned char red = (pixel & 0x00FF0000) >> 16;
> unsigned char green = (pixel & 0x0000FF00) >> 8;
> unsigned char blue = (pixel & 0x000000FF);
> unsigned int offset = ( y * ( ximage->height ) + x ) * 3;
> ximage->data[offset] = red;
> ximage->data[offset+1] = green;
> ximage->data[offset+2] = blue;
> return 0;
> }
>
> 3. Alter the arguments in the call to SetDIBitsToDevice() in the function
> XPutImage() in xlib.c as follows:
>
> res = SetDIBitsToDevice(hDC,dx,dy,width,height,sx,sy+height-1,0,
> height,image->data,&bmInfo,DIB_RGB_COLORS);
>
>
> Sit back and enjoy Win32 Grass.
>
> Unfortunately v.digit doesn't work yet, presumably events need work.
>
> Markus, could you please check this stuff in (sorry).
>
> Cheers
>
> Mike Thomas
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
More information about the grass-windows
mailing list