Drawing 1-bit bitmaps



I have an application (a font editor) that must draw potentially tens of
thousands of bitmap glyphs to the screen.

I have looked through the docs and mail archive. I don't see any way of
drawing a 1-bit bitmap directly. The archive suggests using
gdk_gc_set_clip_mask to create a mask and draw a rectangle through that.

At first glance this seems woefully inefficient involving at least one
unnecessary round trip to the server for each bitmap. More since I will
have to clean up each mask after I use it.

I could also convert each bitmap to an rgb before drawing it. That seems
a huge waste of memory.

X has calls which allow me to draw bitmap images no matter what the
depth of the screen. How do access them in gdk?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]