| /plan9/sys/src/games/music/jukebox/ |
| H A D | colors.c | 63 blue = allocimage(display, r, screen->chan, 1, rgba(0x0000ffff)); in colorinit() 64 darkblue = allocimage(display, r, screen->chan, 1, rgba(0x0000ccff)); in colorinit() 65 darkgrey = allocimage(display, r, screen->chan, 1, rgba(0x444444ff)); in colorinit() 66 darkgreen = allocimage(display, r, screen->chan, 1, rgba(0x008800ff)); in colorinit() 67 darkmagenta = allocimage(display, r, screen->chan, 1, rgba(0x770077ff)); in colorinit() 68 green = allocimage(display, r, screen->chan, 1, rgba(0x00ff00ff)); in colorinit() 69 grey = allocimage(display, r, screen->chan, 1, rgba(0x888888ff)); in colorinit() 70 high = allocimage(display, r, screen->chan, 1, rgba(0x00ccccff)); in colorinit() 71 land = allocimage(display, r, screen->chan, 1, rgba(0xe0ffe0ff)); in colorinit() 72 lightblue = allocimage(display, r, screen->chan, 1, rgba(0x88ccccff)); in colorinit() [all …]
|
| /plan9/sys/src/cmd/proof/ |
| H A D | screen.c | 32 draw(screen, screen->r, display->black, nil, ZP); in clearscreen() 45 p = Pt(screen->clipr.min.x+40, screen->clipr.max.y-40); in screenprint() 46 string(screen, p, display->black, ZP, font, buf); in screenprint() 170 min = addpt(screen->clipr.min, dd); in pan() 171 max = addpt(screen->clipr.max, dd); in pan() 172 draw(screen, rectaddpt(screen->r, subpt(mouse.xy, lastxy)), in pan() 173 screen, nil, screen->r.min); in pan() 175 draw(screen, Rect(max.x, screen->r.min.y, screen->r.max.x, screen->r.max.y), in pan() 178 draw(screen, Rect(screen->r.min.x, screen->r.min.y, min.x, screen->r.max.y), in pan() 181 draw(screen, Rect(screen->r.min.x, max.y, screen->r.max.x, screen->r.max.y), in pan() [all …]
|
| /plan9/sys/src/cmd/ |
| H A D | colors.c | 22 if(screen->depth > 8){ in eresized() 26 n = 1<<screen->depth; in eresized() 27 nx = 1<<(screen->depth/2); in eresized() 31 draw(screen, screen->r, display->white, nil, ZP); in eresized() 32 r = insetrect(screen->r, 5); in eresized() 43 draw(screen, crect[i], color[i], nil, ZP); in eresized() 115 if(screen->chan == CMAP8){ in main() 118 dark = allocimage(display, Rect(0,0,1,1), screen->chan, 1, (grey(j)<<8)+0xFF); in main() 119 color[i] = allocimage(display, Rect(0,0,4,4), screen->chan, 1, (grey(j+17)<<8)+0xFF); in main() 128 color[i] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, (grey(i)<<8)+0xFF); in main() [all …]
|
| H A D | trace.c | 180 cols[i][1] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, c1); in mkcol() 181 cols[i][2] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, c2); in mkcol() 182 cols[i][3] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, c0); in mkcol() 208 cols[5][0] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xEEEEEEFF); in colinit() 209 cols[5][1] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCCCCCCFF); in colinit() 210 cols[5][2] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x888888FF); in colinit() 211 cols[5][3] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xAAAAAAFF); in colinit() 213 red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xFF0000FF); in colinit() 214 green = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x00FF00FF); in colinit() 215 blue = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x0000FFFF); in colinit() [all …]
|
| H A D | clock.c | 20 redraw(Image *screen) in redraw() argument 33 if(ntm == tm && eqrect(screen->r, r)) in redraw() 41 r = screen->r; in redraw() 47 draw(screen, screen->r, back, nil, ZP); in redraw() 49 fillellipse(screen, circlept(c, rad, i*(360/12)), 2, 2, dots, ZP); in redraw() 51 line(screen, c, circlept(c, (rad*3)/4, angmin), 0, 0, 1, minhand, ZP); in redraw() 52 line(screen, c, circlept(c, rad/2, anghr), 0, 0, 1, hrhand, ZP); in redraw() 62 redraw(screen); in eresized() 82 redraw(screen); in main() 99 redraw(screen); in main()
|
| H A D | screenlock.c | 178 screen->r.min.x + Dx(screen->r)/2, in grabmouse() 179 screen->r.min.y + Dy(screen->r)/2); in grabmouse() 185 if(x != screen->r.min.x + Dx(screen->r)/2 || in grabmouse() 186 y != screen->r.min.y + Dy(screen->r)/2){ in grabmouse() 197 string(screen, p, screen->display->white, ZP, font, s); in screenstring() 237 r = screen->r; in lockscreen() 239 dx = (Dx(screen->r) - Dx(i->r)) / 2; in lockscreen() 242 dy = (Dy(screen->r) - Dy(i->r)) / 2; in lockscreen() 245 draw(screen, screen->r, display->black, nil, ZP); in lockscreen() 246 draw(screen, r, i, nil, i->r.min); in lockscreen()
|
| H A D | winwatch.c | 127 r = Rect(0,0,(Dx(screen->r)-2*MARGIN+PAD)/cols-PAD, font->height); in drawnowin() 129 MARGIN+(PAD+Dy(r))*(i%rows))), screen->r.min); in drawnowin() 130 draw(screen, insetrect(r, -1), lightblue, nil, ZP); in drawnowin() 136 draw(screen, win[i].r, lightblue, nil, ZP); in drawwin() 137 _string(screen, addpt(win[i].r.min, Pt(2,0)), display->black, ZP, in drawwin() 140 border(screen, win[i].r, 1, display->black, ZP); in drawwin() 151 rows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD); in geometry() 160 r = Rect(0,0,(Dx(screen->r)-2*MARGIN+PAD)/cols-PAD, font->height); in geometry() 163 MARGIN+(PAD+Dy(r))*(i%rows))), screen->r.min); in geometry() 169 redraw(Image *screen, int all) in redraw() argument [all …]
|
| H A D | histogram.c | 84 draw(screen, Rect(p.x, hrect.min.y, p.x+1, p.y), neutral, in drawdatum() 86 draw(screen, Rect(p.x, p.y, p.x+1, q.y+Dot), dark, nil, ZP); in drawdatum() 87 draw(screen, Rect(p.x, q.y+Dot, p.x+1, hrect.max.y), light, in drawdatum() 90 draw(screen, Rect(p.x, hrect.min.y, p.x+1, q.y), neutral, in drawdatum() 92 draw(screen, Rect(p.x, q.y, p.x+1, p.y+Dot), dark, nil, ZP); in drawdatum() 93 draw(screen, Rect(p.x, p.y+Dot, p.x+1, hrect.max.y), light, in drawdatum() 104 draw(screen, hrect, screen, nil, Pt(hrect.min.x+1, hrect.min.y)); in updatehistogram() 111 stringbg(screen, maxvloc, txtcolor, ZP, display->defaultfont, buf, in updatehistogram() 128 r = screen->r; in redrawhistogram() 129 draw(screen, r, neutral, nil, ZP); in redrawhistogram() [all …]
|
| H A D | kbmap.c | 89 draw(screen, map[i].r, justblue, nil, ZP); in drawmap() 91 draw(screen, map[i].r, lightblue, nil, ZP); in drawmap() 93 _string(screen, addpt(map[i].r.min, Pt(2,0)), display->black, ZP, in drawmap() 96 border(screen, map[i].r, 1, display->black, ZP); in drawmap() 105 rows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD); in geometry() 107 r = Rect(0,0,(Dx(screen->r)-2*MARGIN), font->height); in geometry() 110 MARGIN+(PAD+Dy(r))*(i%rows))), screen->r.min); in geometry() 115 redraw(Image *screen) in redraw() argument 119 draw(screen, screen->r, lightblue, nil, ZP); in redraw() 131 redraw(screen); in eresized() [all …]
|
| /plan9/sys/src/ape/lib/draw/ |
| H A D | colors.c | 49 if(screen->depth > 8){ in eresized() 53 n = 1<<screen->depth; in eresized() 54 nx = 1<<(screen->depth/2); in eresized() 58 draw(screen, screen->r, display->white, nil, ZP); in eresized() 59 r = insetrect(screen->r, 5); in eresized() 70 draw(screen, crect[i], color[i], nil, ZP); in eresized() 144 if(screen->chan == CMAP8){ in main() 147 dark = allocimage(display, Rect(0,0,1,1), screen->chan, 1, (grey(j)<<8)+0xFF); in main() 148 color[i] = allocimage(display, Rect(0,0,4,4), screen->chan, 1, (grey(j+17)<<8)+0xFF); in main() 157 color[i] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, (grey(i)<<8)+0xFF); in main() [all …]
|
| /plan9/sys/src/libdraw/ |
| H A D | emenuhit.c | 89 draw(screen, r, restore, nil, restore->r.min); in paintitem() 93 draw(save, save->r, screen, nil, r.min); in paintitem() 97 draw(screen, r, highlight? high : back, nil, pt); in paintitem() 98 string(screen, pt, highlight? htext : text, pt, font, item); in paintitem() 135 draw(screen, insetrect(textr, Border-Margin), back, nil, ZP); in menupaint() 145 draw(screen, scrollr, back, nil, ZP); in menuscrollpaint() 152 border(screen, r, 1, bord, ZP); in menuscrollpaint() 156 draw(screen, insetrect(r, 1), menutxt, nil, ZP); in menuscrollpaint() 171 sc = screen->clipr; in emenuhit() 172 replclipr(screen, 0, screen->r); in emenuhit() [all …]
|
| H A D | menuhit.c | 32 high = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkgreen); /* dark green */ in menucolors() 33 bord = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DMedgreen); /* not as dark green */ in menucolors() 151 …menutxt = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, DDarkgreen); /* border color; BUG… in menuscrollpaint() 168 sc = screen->clipr; in menuhit() 169 replclipr(screen, 0, screen->r); in menuhit() 180 screenitem = (Dy(screen->r)-10)/(font->height+Vspacing); in menuhit() 204 if(r.max.x>screen->r.max.x) in menuhit() 205 pt.x = screen->r.max.x-r.max.x; in menuhit() 206 if(r.max.y>screen->r.max.y) in menuhit() 207 pt.y = screen->r.max.y-r.max.y; in menuhit() [all …]
|
| H A D | egetrect.c | 96 r = Rect(0, 0, Dx(screen->r), W); in edrawgetrect() 97 tmp[0] = allocimage(display, r, screen->chan, 0, -1); in edrawgetrect() 98 tmp[1] = allocimage(display, r, screen->chan, 0, -1); in edrawgetrect() 99 r = Rect(0, 0, W, Dy(screen->r)); in edrawgetrect() 100 tmp[2] = allocimage(display, r, screen->chan, 0, -1); in edrawgetrect() 101 tmp[3] = allocimage(display, r, screen->chan, 0, -1); in edrawgetrect() 102 red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed); in edrawgetrect() 109 draw(screen, rects[i], tmp[i], nil, ZP); in edrawgetrect() 113 draw(tmp[i], Rect(0, 0, Dx(rects[i]), Dy(rects[i])), screen, nil, rects[i].min); in edrawgetrect() 114 draw(screen, rects[i], red, nil, ZP); in edrawgetrect()
|
| H A D | getrect.c | 112 tmp[0] = allocimage(display, r, screen->chan, 0, -1); in drawgetrect() 113 tmp[1] = allocimage(display, r, screen->chan, 0, -1); in drawgetrect() 115 tmp[2] = allocimage(display, r, screen->chan, 0, -1); in drawgetrect() 116 tmp[3] = allocimage(display, r, screen->chan, 0, -1); in drawgetrect() 117 red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed); in drawgetrect() 126 draw(screen, rects[i], tmp[i], nil, ZP); in drawgetrect() 130 draw(tmp[i], Rect(0, 0, Dx(rects[i]), Dy(rects[i])), screen, nil, rects[i].min); in drawgetrect() 131 draw(screen, rects[i], red, nil, ZP); in drawgetrect()
|
| /plan9/sys/src/cmd/plot/libplot/ |
| H A D | fill.c | 53 ylist=(Edge **)malloc(Dy(screen->r)*sizeof(Edge *)); in polygon() 55 eylist=ylist+Dy(screen->r); in polygon() 77 if(p1.y<=screen->r.min.y) continue; in polygon() 78 if(p0.y>=screen->r.max.y) continue; in polygon() 80 if(p1.y>screen->r.max.y) in polygon() 81 ep->maxy=screen->r.max.y; in polygon() 97 if(ep->p.y<screen->r.min.y){ in polygon() 98 dy=screen->r.min.y-ep->p.y; in polygon() 103 ep->p.y=screen->r.min.y; in polygon() 105 insert(ep, ylist+(ep->p.y-screen->r.min.y)); in polygon() [all …]
|
| H A D | machdep.c | 73 clipminx=mapminx=screen->r.min.x+4; in m_initialize() 74 clipminy=mapminy=screen->r.min.y+4; in m_initialize() 75 clipmaxx=mapmaxx=screen->r.max.x-5; in m_initialize() 76 clipmaxy=mapmaxy=screen->r.max.y-5; in m_initialize() 88 offscreen = screen; in m_initialize() 98 if(offscreen!=screen) in m_swapbuf() 99 draw(screen, offscreen->r, offscreen, nil, offscreen->r.min); in m_swapbuf() 103 if(offscreen==screen){ in m_dblbuf() 104 offscreen=allocimage(display, insetrect(screen->r, 4), screen->chan, 0, -1); in m_dblbuf() 107 offscreen=screen; in m_dblbuf()
|
| /plan9/sys/src/cmd/ip/ |
| H A D | gping.c | 252 runestring(screen, p, display->black, ZP, mediumfont, r); in label() 265 draw(screen, Rect(p.x, y-1, p.x+Labspace, y+1), display->black, nil, ZP); in hashmark() 267 string(screen, Pt(x, y-mediumfont->height/2), in hashmark() 319 draw(screen, Rect(p.x, g->r.min.y, p.x+1, p.y), cols[c][0], nil, paritypt(p.x)); in drawdatum() 320 draw(screen, Rect(p.x, p.y, p.x+1, q.y+Dot), cols[c][2], nil, ZP); in drawdatum() 321 draw(screen, Rect(p.x, q.y+Dot, p.x+1, g->r.max.y), cols[c][1], nil, ZP); in drawdatum() 323 draw(screen, Rect(p.x, g->r.min.y, p.x+1, q.y), cols[c][0], nil, paritypt(p.x)); in drawdatum() 324 draw(screen, Rect(p.x, q.y, p.x+1, p.y+Dot), cols[c][2], nil, ZP); in drawdatum() 325 draw(screen, Rect(p.x, p.y+Dot, p.x+1, g->r.max.y), cols[c][1], nil, ZP); in drawdatum() 336 draw(screen, Rect(x, g->r.min.y, x+1, g->r.max.y), cols[c][2], nil, ZP); in drawmark() [all …]
|
| /plan9/sys/src/games/sudoku/ |
| H A D | sudoku.c | 99 tmp = allocimage(display, r, screen->chan, repl, color); in eallocimage() 194 draw(screen, rectaddpt(r, screen->r.min), col, dig[num], ZP); in drawcell() 227 draw(screen, screen->r, brdr, nil, ZP); in drawscreen() 228 draw(screen, insetrect(screen->r, Border), background, nil, ZP); in drawscreen() 230 l1 = addpt(screen->r.min, Pt(i*Square, Square)); in drawscreen() 231 l2 = addpt(screen->r.min, Pt(i*Square, Maxy)); in drawscreen() 232 line(screen, l1, l2, Endsquare, Endsquare, (i%3) == 0 ? Thickline : Line, brdr, ZP); in drawscreen() 233 l1 = addpt(screen->r.min, Pt(0, (i+1)*Square)); in drawscreen() 234 l2 = addpt(screen->r.min, Pt(Maxx, (i+1)*Square)); in drawscreen() 235 line(screen, l1, l2, Endsquare, Endsquare, (i%3) == 0 ? Thickline : Line, brdr, ZP); in drawscreen() [all …]
|
| /plan9/sys/src/cmd/page/ |
| H A D | view.c | 147 ul.y = screen->r.max.y - Dy(im->r); in showpage() 151 redraw(screen); in showpage() 288 ul = screen->r.min; in viewer() 365 string(screen, addpt(screen->r.min, Pt(5,5)), display->black, ZP, in viewer() 421 if(screen->r.min.y <= ul.y && ul.y < screen->r.max.y){ in viewer() 428 i = Dy(screen->r)/2; in viewer() 431 if(i+ul.y > screen->r.min.y) in viewer() 432 i = screen->r.min.y - ul.y; in viewer() 443 if(screen->r.min.y <= i && i <= screen->r.max.y){ in viewer() 444 ul.y = screen->r.min.y; in viewer() [all …]
|
| /plan9/sys/src/cmd/vt/ |
| H A D | main.c | 205 red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed); in initialize() 206 bordercol = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCCCCCCCC); in initialize() 207 cursback = allocimage(display, Rect(0, 0, CW+1, NS+1), screen->chan, 0, DNofill); in initialize() 210 colors[i] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, in initialize() 212 hicolors[i] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, in initialize() 232 draw(screen, r, bgcolor, nil, ZP); in clear() 254 draw(screen, Rpt(pt(x, y), addpt(pt(x, y), Pt(CW,NS))), in cursoff() 268 draw(cursback, cursback->r, screen, nil, pt(x, y)); in curson() 273 border(screen, Rpt(pt(x, y), addpt(pt(x, y), Pt(CW,NS))), 2, col, ZP); in curson() 557 putenvint("XPIXELS", Dx(screen->r)-2*XMARGIN); in exportsize() [all …]
|
| H A D | hp.c | 120 bitblt(&screen, pt(x, y), in emulate() 121 &screen, Rpt(pt(x+1, y), in emulate() 198 bitblt(&screen, pt(x+n, y), &screen, in emulate() 202 string(&screen, pt(x, y), font, buf, DxorS); in emulate() 204 rectf(&screen, in emulate()
|
| /plan9/sys/src/games/ |
| H A D | memo.c | 122 draw(screen, block[i].r, block[i].face, nil, ZP); in main() 197 p = Pt(Dx(screen->r)+8, Dy(screen->r)+8); in eresized() 202 draw(screen, screen->r, back, nil, ZP); in eresized() 214 p = Pt(Dx(screen->r)/8, Dy(screen->r)/4); in redraw() 215 r = screen->r; in redraw() 218 draw(screen, r, fore, nil, ZP); in redraw() 220 string(screen,p,display->black,ZP,font,buf); in redraw() 228 draw(screen, r,block[i].face,nil,ZP); in redraw() 231 draw(screen, r, back, nil, ZP); in redraw() 234 draw(screen, r, fore, nil, ZP); in redraw() [all …]
|
| H A D | catclock.c | 81 redraw(Image *screen) in redraw() argument 83 Rectangle r = Rect(0,0,Dx(screen->r), Dy(screen->r)); in redraw() 95 redraw(screen); in eresized() 108 redraw(screen); in main() 135 vhand[0]=add(screen->r.min, add(catoffs, Pt(CATWID/2+round(length*s), CATHGT/2-round(length*c)))); in drawhand() 136 vhand[1]=add(screen->r.min, add(catoffs, Pt(CATWID/2-round(ws+wc), CATHGT/2+round(wc-ws)))); in drawhand() 137 vhand[2]=add(screen->r.min, add(catoffs, Pt(CATWID/2-round(ws-wc), CATHGT/2+round(wc+ws)))); in drawhand() 139 fillpoly(screen, vhand, 4, wind, display->white, in drawhand() 140 addpt(screen->r.min, vhand[0])); in drawhand() 141 poly(screen, vhand, 4, Endsquare, Endsquare, 0, display->black, in drawhand() [all …]
|
| /plan9/sys/src/cmd/faces/ |
| H A D | main.c | 101 blue = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x008888FF); /* blue-green */ in init() 132 r.min = addpt(screen->r.min, datep); in drawtime() 140 draw(screen, r, bgrnd, nil, ZP); in drawtime() 141 string(screen, r.min, display->black, ZP, datefont, date); in drawtime() 208 string(screen, p, color, ZP, f, s); in center() 219 r.min = addpt(screen->r.min, facep); in facerect() 259 draw(screen, r, bgrnd, nil, ZP); in drawface() 260 draw(screen, r, f->bit, f->mask, ZP); in drawface() 310 draw(screen, leftr, first>0? blue : bgrnd, left, leftright.min); in drawarrows() 311 draw(screen, rightr, last<nfaces? blue : bgrnd, right, leftright.min); in drawarrows() [all …]
|
| /plan9/sys/src/cmd/vnc/ |
| H A D | draw.c | 66 x = Dx(screen->r); in requestupdate() 67 y = Dy(screen->r); in requestupdate() 113 if(r.max.x > Dx(screen->r) || r.max.y > Dy(screen->r)){ in updatescreen() 114 r = clippixbuf(r, Dx(screen->r), Dy(screen->r)); in updatescreen() 124 img = allocimage(display, r, screen->chan, 0, DNofill); in updatescreen() 130 …fprint(2, "loadimage %d on %R for %R returned %d: %r\n", b, rectaddpt(r, screen->r.min), screen->r… in updatescreen() 131 draw(screen, rectaddpt(r, screen->r.min), img, nil, r.min); in updatescreen() 263 p = addpt(p, screen->r.min); in dorectangle() 264 r = rectaddpt(r, screen->r.min); in dorectangle() 265 draw(screen, r, screen, nil, p); in dorectangle() [all …]
|