MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilutXCreatePixmap

Function ILAPIENTRY ilutXCreatePixmap

DevIL/src-ILUT/src/ilut_x11.cpp:210–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210Pixmap ILAPIENTRY ilutXCreatePixmap( Display * dpy, Drawable draw )
211{
212 XImage * img;
213 GC gc;
214 Pixmap pix;
215
216 img = ilutXCreateImage( dpy );
217 if (!img) {
218 return None;
219 }
220
221 gc = DefaultGC(dpy,DefaultScreen(dpy));
222 if (!gc) {
223 XDestroyImage( img );
224 return None;
225 }
226
227 pix = XCreatePixmap( dpy,draw, width,height,24 );
228 if (!pix ) {
229 XDestroyImage( img );
230 return None;
231 }
232
233 XPutImage( dpy,pix,gc,img, 0,0,0,0,width,height );
234
235 XDestroyImage( img );
236
237 return pix;
238}
239
240
241

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected