OLD | NEW |
1 #include <u.h> | 1 #include <u.h> |
2 #include <libc.h> | 2 #include <libc.h> |
3 #include <draw.h> | 3 #include <draw.h> |
4 #include <mouse.h> | 4 #include <mouse.h> |
5 | 5 |
6 Display *display; | 6 Display *display; |
7 Font *font; | 7 Font *font; |
8 Image *screen; | 8 Image *screen; |
9 int _drawdebug; | 9 int _drawdebug; |
10 | 10 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 image->depth = chantodepth(image->chan); | 172 image->depth = chantodepth(image->chan); |
173 image->repl = atoi(info+3*12); | 173 image->repl = atoi(info+3*12); |
174 image->r.min.x = atoi(info+4*12); | 174 image->r.min.x = atoi(info+4*12); |
175 image->r.min.y = atoi(info+5*12); | 175 image->r.min.y = atoi(info+5*12); |
176 image->r.max.x = atoi(info+6*12); | 176 image->r.max.x = atoi(info+6*12); |
177 image->r.max.y = atoi(info+7*12); | 177 image->r.max.y = atoi(info+7*12); |
178 image->clipr.min.x = atoi(info+8*12); | 178 image->clipr.min.x = atoi(info+8*12); |
179 image->clipr.min.y = atoi(info+9*12); | 179 image->clipr.min.y = atoi(info+9*12); |
180 image->clipr.max.x = atoi(info+10*12); | 180 image->clipr.max.x = atoi(info+10*12); |
181 image->clipr.max.y = atoi(info+11*12); | 181 image->clipr.max.y = atoi(info+11*12); |
| 182 ········ |
| 183 a = bufimage(d, 3); |
| 184 a[0] = 'q'; |
| 185 a[1] = 1; |
| 186 a[2] = 'd'; |
| 187 d->dpi = 100; |
| 188 if(flushimage(d, 0) >= 0 && _displayrddraw(d, info, 12) == 12) |
| 189 d->dpi = atoi(info); |
| 190 |
182 return image; | 191 return image; |
183 } | 192 } |
184 | 193 |
185 /* | 194 /* |
186 * Attach, or possibly reattach, to window. | 195 * Attach, or possibly reattach, to window. |
187 * If reattaching, maintain value of screen pointer. | 196 * If reattaching, maintain value of screen pointer. |
188 */ | 197 */ |
189 int | 198 int |
190 getwindow(Display *d, int ref) | 199 getwindow(Display *d, int ref) |
191 { | 200 { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 return 0; | 421 return 0; |
413 } | 422 } |
414 if(d->bufp+n > d->buf+d->bufsize) | 423 if(d->bufp+n > d->buf+d->bufsize) |
415 if(doflush(d) < 0) | 424 if(doflush(d) < 0) |
416 return 0; | 425 return 0; |
417 p = d->bufp; | 426 p = d->bufp; |
418 d->bufp += n; | 427 d->bufp += n; |
419 return p; | 428 return p; |
420 } | 429 } |
421 | 430 |
OLD | NEW |