我想将一个由×元素组成的int
字符串加载到Xlib中的a中,它表示一个32位RGB值。width
height
Pixmap
我刚刚发现XReadBitmapFile()
,它可以从 X Bitmap 读取到 X Pixmap,这可能无法真正满足我的需求。
那么,我应该设计一个新的函数来处理它吗?任何提示表示赞赏。
void drawString::DrawString(Display *d, Drawable win, XFontStruct *fontType, int rectWidth, int rectHeight, int HAlign, int VAlign, char* fmt, unsigned long color, unsigned long textColor, Pixmap bgPixmap)
{
GC gc;
if( initValues->blnExitUITThread )
return;
if( fontType == NULL )
return;
unsigned short fontHeight, fontWidth, singleFontHeight;
int x, y;
Pixmap pixmap;
char* token;
initValues->trueColor = textColor;
pixmap = XCreatePixmap(d, win, rectWidth, rectHeight, DefaultDepth(d, 0));
gc = XCreateGC(d, pixmap, 0, NULL);