ui/motif/graphics.c

changeset 114
909fe96e5659
parent 103
6a6718269c22
child 115
102fc0b8fe3e
equal deleted inserted replaced
113:500c085d2133 114:909fe96e5659
218 color.blue = blue * 257; 218 color.blue = blue * 257;
219 XAllocColor(gr->display, gr->colormap, &color); 219 XAllocColor(gr->display, gr->colormap, &color);
220 XSetForeground(gr->display, gr->gc, color.pixel); 220 XSetForeground(gr->display, gr->gc, color.pixel);
221 } 221 }
222 222
223 void ui_draw_line(UiGraphics *g, int x1, int y1, int x2, int y2) {
224 UiXlibGraphics *gr = (UiXlibGraphics*)g;
225 XDrawLine(gr->display, XtWindow(gr->widget), gr->gc, x1, y1, x2, y2);
226 }
227
223 void ui_draw_rect(UiGraphics *g, int x, int y, int w, int h, int fill) { 228 void ui_draw_rect(UiGraphics *g, int x, int y, int w, int h, int fill) {
224 UiXlibGraphics *gr = (UiXlibGraphics*)g; 229 UiXlibGraphics *gr = (UiXlibGraphics*)g;
225 if(fill) { 230 if(fill) {
226 XFillRectangle(gr->display, XtWindow(gr->widget), gr->gc, x, y, w, h); 231 XFillRectangle(gr->display, XtWindow(gr->widget), gr->gc, x, y, w, h);
227 } else { 232 } else {

mercurial