image data format question i am posting this for a friend please respond to vaughn sonatech hub ucsb edu i m working on an application where we are creating a dither pattern and rendering it in a window by applying it to the stipple pattern of the gc the following code segment almost works if the window width is an even multiple of if it is not an even multiple it skews the pattern towards the right another problem whether it is an even multiple of or not is a series of vertical lines spaced pixels apart extern display dpy extern window xid extern gc gc extern int max x max y set in resize handler dither pixels char pixels dither pattern data char bm bitmap data char bmp long i arraymax arraymax max x max y bm char malloc arraymax bmp bm for i j i arraymax i if pixels i dither bit bmp j pixel on else bmp j pixel off if j bmp j stipple xcreatebitmapfromdata dpy xid bm max x max y free bm xclearwindow dpy xid xsetstipple dpy gc stipple xsetfillstyle dpy gc fillstippled xfillrectangle dpy xid gc max x max y xsetfillstyle dpy gc fillsolid i suspect the answer is to pad the data mike vaughn sonatech
