[Redbutton-devel] SF.net SVN: redbutton: [62] redbutton-browser/trunk/MHEGDisplay.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-15 19:01:54
|
Revision: 62 Author: skilvington Date: 2006-05-15 12:01:46 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=62&view=rev Log Message: ----------- use correct RGB masks for bitmaps Modified Paths: -------------- redbutton-browser/trunk/MHEGDisplay.c Modified: redbutton-browser/trunk/MHEGDisplay.c =================================================================== --- redbutton-browser/trunk/MHEGDisplay.c 2006-05-15 16:12:00 UTC (rev 61) +++ redbutton-browser/trunk/MHEGDisplay.c 2006-05-15 19:01:46 UTC (rev 62) @@ -846,10 +846,13 @@ } /* get X to draw the XImage onto a Pixmap */ -/* TODO */ -/* this should be the Visual that matches PictStandardARGB32, not d->vis (the Window Visual) */ - if((ximg = XCreateImage(d->dpy, d->vis, 32, ZPixmap, 0, xdata, width, height, 32, 0)) == NULL) + if((ximg = XCreateImage(d->dpy, NULL, 32, ZPixmap, 0, xdata, width, height, 32, 0)) == NULL) fatal("XCreateImage failed"); + /* passed NULL Visual to XCreateImage, so set the rgb masks now */ + ximg->red_mask = pic_format->direct.redMask; + ximg->green_mask = pic_format->direct.greenMask; + ximg->blue_mask = pic_format->direct.blueMask; + /* create the Pixmap */ bitmap->image = XCreatePixmap(d->dpy, d->win, width, height, 32); gc = XCreateGC(d->dpy, bitmap->image, 0, NULL); XPutImage(d->dpy, bitmap->image, gc, ximg, 0, 0, 0, 0, width, height); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |