- 论坛徽章:
- 1
|
请教众位,GrNewGC()函数使用的位置在哪里?
看了一下Microwindows的参考范例
#include <stdio.h>
#define MWINCLUDECOLORS
#include "microwin/nano-X.h"
GR_WINDOW_ID wid;
GR_GC_ID gc;
void event_handler (GR_EVENT *event);
int main (void)
{
if (GrOpen() < 0)
{
fprintf (stderr, "GrOpen failed");
exit (1);
}
gc = GrNewGC();
GrSetGCUseBackground (gc, GR_FALSE);
GrSetGCForeground (gc, RED);
wid = GrNewWindowEx (GR_WM_PROPS_APPFRAME |
GR_WM_PROPS_CAPTION |
GR_WM_PROPS_CLOSEBOX,
"Hello Window",
GR_ROOT_WINDOW_ID,
50, 50, 200, 100, WHITE);
GrSelectEvents (wid, GR_EVENT_MASK_EXPOSURE |
GR_EVENT_MASK_CLOSE_REQ);
GrMapWindow (wid);
GrMainLoop (event_handler);
}
GrNewGC()这个函数在文档中的解释为Create a new graphics context。还有谁知道这个函数更具体的属性? |
|