| /plan9/sys/src/libcontrol/ |
| H A D | radiobutton.c | 59 if(ptinrect(m->xy, r->buttons[i]->rect) && r->buttons[i]->mouse){ in radiomouse() 87 Rectangle rect; in radioctl() local 143 rect.min.x = cp->iargs[1]; in radioctl() 144 rect.min.y = cp->iargs[2]; in radioctl() 145 rect.max.x = cp->iargs[3]; in radioctl() 146 rect.max.y = cp->iargs[4]; in radioctl() 147 r->rect = rect; in radioctl() 160 rect.max = Pt(0x7fffffff, 0x7fffffff); in radioctl() 163 rect.max.x = cp->iargs[3]; in radioctl() 164 rect.max.y = cp->iargs[4]; in radioctl() [all …]
|
| H A D | menu.c | 103 draw(m->window, m->rect, m->image->image, nil, m->image->image->r.min); in menushow() 105 border(m->window, m->rect, m->border, m->bordercolor->image, ZP); in menushow() 114 clipr = insetrect(m->rect, m->border); in menushow() 165 m->rect.max.y = m->rect.min.y; /* go to zero size */ in menuhide() 190 r = insetrect(m->rect, m->border); in menutrack() 269 m->rect = r; in menuctl() 325 m->rect.max.x = m->rect.min.x + diag.x; in menuctl() 326 m->rect.max.y = m->rect.min.y + diag.y; in menuctl() 327 m->window = allocwindow(_screen, m->rect, Refbackup, DWhite); in menuctl() 337 Pt(m->rect.min.x+Dx(m->rect)/2, m->rect.min.y+up*h+h/2)); in menuctl()
|
| H A D | box.c | 62 if (ptinrect(m->xy,b->rect)) in boxmouse() 82 border(b->screen, b->rect, b->border, b->bordercolor->image, ZP); in boxshow() 83 r = insetrect(b->rect, b->border); in boxshow() 85 r = b->rect; in boxshow() 138 b->rect = r; in boxctl()
|
| H A D | keyboard.c | 183 return k->rect.max.y-k->border; in keyboardy() 184 dy = Dy(k->rect)-2*k->border; in keyboardy() 185 return k->rect.min.y+k->border+(row*dy+Nrow-1)/Nrow; in keyboardy() 196 r = insetrect(k->rect, k->border); in whichkey() 235 r = insetrect(k->rect, k->border); in keyrect() 269 if(Dx(k->rect)-2*k->border <= 0) in keydraw() 272 im = allocimage(display, k->rect, screen->chan, 0, ~0); in keydraw() 277 r = insetrect(k->rect, k->border); in keydraw() 278 border(im, k->rect, k->border, k->bordercolor->image, ZP); in keydraw() 336 if(k->im[0]==nil || !eqrect(k->im[0]->r, k->rect)) in keyboardshow() [all …]
|
| /plan9/sys/src/cmd/gs/src/ |
| H A D | zdpnext.c | 122 gs_rect rect; in zcompositerect() local 124 rect.q.x = (rect.p.x = dest_rect[0]) + dest_rect[2]; in zcompositerect() 125 rect.q.y = (rect.p.y = dest_rect[1]) + dest_rect[3]; in zcompositerect() 126 code = gs_rectfill(igs, &rect, 1); in zcompositerect() 231 gs_int_rect rect; in zsizeimagebox() local 249 rect.p.x = (int)floor(drect.p.x); in zsizeimagebox() 250 rect.p.y = (int)floor(drect.p.y); in zsizeimagebox() 251 rect.q.x = (int)ceil(drect.q.x); in zsizeimagebox() 252 rect.q.y = (int)ceil(drect.q.y); in zsizeimagebox() 257 box_confine(&rect.p.x, &rect.q.x, dev->width); in zsizeimagebox() [all …]
|
| H A D | gxshade1.c | 80 Fb_fill_region(Fb_fill_state_t * pfs, const gs_fixed_rect *rect) in Fb_fill_region() argument 100 pfs1.rect = *rect; in Fb_fill_region() 118 gs_shading_Fb_fill_rectangle(const gs_shading_t * psh0, const gs_rect * rect, in gs_shading_Fb_fill_rectangle() argument 139 gs_bbox_transform_inverse(rect, &psh->params.Matrix, &pbox); in gs_shading_Fb_fill_rectangle() 165 gs_rect rect; /* bounding rectangle in user space */ member 194 pfs1.rect = *rect_clip; in A_fill_region() 211 gs_shading_A_fill_rectangle_aux(const gs_shading_t * psh0, const gs_rect * rect, in gs_shading_A_fill_rectangle_aux() argument 227 state.rect = *rect; in gs_shading_A_fill_rectangle_aux() 241 gs_bbox_transform_inverse(rect, &cmat, &t_rect); in gs_shading_A_fill_rectangle_aux() 276 gs_shading_A_fill_rectangle(const gs_shading_t * psh0, const gs_rect * rect, in gs_shading_A_fill_rectangle() argument [all …]
|
| H A D | gdevsnfb.c | 57 prect.rect = stype.visiblerect; in sonyfb_open() 88 prect.ptnRect = prect.rect; in sonyfb_output_page() 93 prect.ptnBM.rect.origin.x = 0; in sonyfb_output_page() 94 prect.ptnBM.rect.origin.y = 0; in sonyfb_output_page() 95 prect.ptnBM.rect.extent.x = byte_width * 8; /* width in 16bit words */ in sonyfb_output_page() 96 prect.ptnBM.rect.extent.y = height; in sonyfb_output_page() 104 prect.clip = prect.rect; in sonyfb_output_page() 107 prect.drawBM.width = (prect.rect.extent.x + 15) / 16; in sonyfb_output_page() 108 prect.drawBM.rect = prect.rect; in sonyfb_output_page()
|
| H A D | gdevpnga.c | 69 gs_int_rect rect; member 85 gs_int_rect rect; member 325 pdf14_buf_new(gs_int_rect *rect, bool has_alpha_g, bool has_shape, in pdf14_buf_new() argument 330 int rowstride = (rect->q.x - rect->p.x + 3) & -4; in pdf14_buf_new() 331 int planestride = rowstride * (rect->q.y - rect->p.y); in pdf14_buf_new() 343 result->rect = *rect; in pdf14_buf_new() 369 pdf14_ctx_new(gs_int_rect *rect, int n_chan, gs_memory_t *memory) in pdf14_ctx_new() argument 377 buf = pdf14_buf_new(rect, false, false, n_chan, memory); in pdf14_ctx_new() 385 result->rect = *rect; in pdf14_ctx_new() 425 pdf14_push_transparency_group(pdf14_ctx *ctx, gs_int_rect *rect, in pdf14_push_transparency_group() argument [all …]
|
| H A D | gxclrect.c | 28 #define cmd_set_rect(rect)\ argument 29 ((rect).x = x, (rect).y = y,\ 30 (rect).width = width, (rect).height = height) 54 int dx = x - pcls->rect.x; in cmd_write_rect_cmd() 55 int dy = y - pcls->rect.y; in cmd_write_rect_cmd() 56 int dwidth = width - pcls->rect.width; in cmd_write_rect_cmd() 57 int dheight = height - pcls->rect.height; in cmd_write_rect_cmd() 69 cmd_set_rect(pcls->rect); in cmd_write_rect_cmd() 126 int rcsize = 1 + cmd_size_rect(&pcls->rect); in cmd_write_rect_cmd() 133 cmd_put_rect(&pcls->rect, dp + 1); in cmd_write_rect_cmd() [all …]
|
| H A D | gxclimag.c | 156 gx_cmd_rect rect; in clist_fill_mask() local 162 rect.x = orig_x, rect.y = y0; in clist_fill_mask() 163 rect.width = orig_width, rect.height = yend - y0; in clist_fill_mask() 164 rsize = 1 + cmd_sizexy(rect); in clist_fill_mask() 182 cmd_putxy(rect, dp); in clist_fill_mask() 186 pcls->rect = rect; in clist_fill_mask() 204 gs_int_rect rect; member 393 pie->rect = *prect; in clist_begin_typed_image() 395 pie->rect.p.x = 0, pie->rect.p.y = 0; in clist_begin_typed_image() 396 pie->rect.q.x = pim->Width, pie->rect.q.y = pim->Height; in clist_begin_typed_image() [all …]
|
| H A D | gsptype2.c | 213 gx_path * ppath, gs_fixed_rect * rect, in gx_dc_pattern2_fill_path() argument 219 return gs_shading_fill_path_adjusted(pinst->template.Shading, ppath, rect, dev, in gx_dc_pattern2_fill_path() 230 gs_fixed_rect rect; in gx_dc_pattern2_fill_rectangle() local 231 rect.p.x = int2fixed(x); in gx_dc_pattern2_fill_rectangle() 232 rect.p.y = int2fixed(y); in gx_dc_pattern2_fill_rectangle() 233 rect.q.x = int2fixed(x + w); in gx_dc_pattern2_fill_rectangle() 234 rect.q.y = int2fixed(y + h); in gx_dc_pattern2_fill_rectangle() 235 return gx_dc_pattern2_fill_path(pdevc, NULL, &rect, dev); in gx_dc_pattern2_fill_rectangle() 269 gx_dc_pattern2_shade_bbox_transform2fixed(const gs_rect * rect, const gs_imager_state * pis, in gx_dc_pattern2_shade_bbox_transform2fixed() argument 273 int code = gs_bbox_transform(rect, &ctm_only(pis), &dev_rect); in gx_dc_pattern2_shade_bbox_transform2fixed()
|
| H A D | gxclrast.c | 660 cbp = cmd_read_rect(op, &state.rect, cbp); in clist_playback_band() 664 state.rect.x += *cbp + cmd_min_short; in clist_playback_band() 665 state.rect.width += cbp[1] + cmd_min_short; in clist_playback_band() 667 state.rect.height += (op & 0xf) + cmd_min_dxy_tiny; in clist_playback_band() 670 state.rect.y += cbp[2] + cmd_min_short; in clist_playback_band() 671 state.rect.height += cbp[3] + cmd_min_short; in clist_playback_band() 678 state.rect.x += state.rect.width; in clist_playback_band() 682 state.rect.x += (txy >> 4) + cmd_min_dxy_tiny; in clist_playback_band() 683 state.rect.y += (txy & 0xf) + cmd_min_dxy_tiny; in clist_playback_band() 685 state.rect.width += (op & 7) + cmd_min_dw_tiny; in clist_playback_band() [all …]
|
| H A D | gdevp14.c | 238 pdf14_buf_new(gs_int_rect *rect, bool has_alpha_g, bool has_shape, in pdf14_buf_new() argument 243 int rowstride = (rect->q.x - rect->p.x + 3) & -4; in pdf14_buf_new() 244 int height = (rect->q.y - rect->p.y); in pdf14_buf_new() 261 result->rect = *rect; in pdf14_buf_new() 301 pdf14_ctx_new(gs_int_rect *rect, int n_chan, bool additive, gs_memory_t *memory) in pdf14_ctx_new() argument 311 buf = pdf14_buf_new(rect, false, false, n_chan, memory); in pdf14_ctx_new() 317 buf->rect.q.x, buf->rect.q.y, buf->n_chan); in pdf14_ctx_new() 324 result->rect = *rect; in pdf14_ctx_new() 363 pdf14_push_transparency_group(pdf14_ctx *ctx, gs_int_rect *rect, in pdf14_push_transparency_group() argument 382 buf = pdf14_buf_new(rect, !isolated, has_shape, ctx->n_chan, ctx->memory); in pdf14_push_transparency_group() [all …]
|
| H A D | gximag3x.c | 119 gs_int_rect rect; member 161 pixel.rect = *prect; in gx_begin_image3x_generic() 163 pixel.rect.p.x = pixel.rect.p.y = 0; in gx_begin_image3x_generic() 164 pixel.rect.q.x = pim->Width; in gx_begin_image3x_generic() 165 pixel.rect.q.y = pim->Height; in gx_begin_image3x_generic() 184 penum->pixel.width = pixel.rect.q.x - pixel.rect.p.x; in gx_begin_image3x_generic() 185 penum->pixel.height = pixel.rect.q.y - pixel.rect.p.y; in gx_begin_image3x_generic() 270 &mask[i].rect, NULL, NULL, in gx_begin_image3x_generic() 428 pmcv->rect.p.x = ppcv->rect.p.x * mask_width / pim->Width; in check_image3x_mask() 429 pmcv->rect.p.y = ppcv->rect.p.y * mask_height / pim->Height; in check_image3x_mask() [all …]
|
| H A D | dwimg.c | 619 RECT rect; in image_updatesize() local 628 GetClientRect(img->hwnd, &rect); in image_updatesize() 630 MAKELONG(rect.right, rect.bottom)); in image_updatesize() 1127 RECT rect; in WndImg2Proc() local 1187 GetWindowRect(hwnd, &rect); in WndImg2Proc() 1188 img->x = rect.left; in WndImg2Proc() 1189 img->y = rect.top; in WndImg2Proc() 1198 GetWindowRect(hwnd, &rect); in WndImg2Proc() 1199 img->cx = rect.right - rect.left; in WndImg2Proc() 1200 img->cy = rect.bottom - rect.top; in WndImg2Proc() [all …]
|
| H A D | gxipixel.c | 157 penum->rect.x = prect->p.x; in gx_image_enum_alloc() 158 penum->rect.y = prect->p.y; in gx_image_enum_alloc() 159 penum->rect.w = prect->q.x - prect->p.x; in gx_image_enum_alloc() 160 penum->rect.h = prect->q.y - prect->p.y; in gx_image_enum_alloc() 162 penum->rect.x = 0, penum->rect.y = 0; in gx_image_enum_alloc() 163 penum->rect.w = width, penum->rect.h = height; in gx_image_enum_alloc() 239 if (penum->rect.w == width && penum->rect.h == height) { in gx_image_enum_begin() 243 int rw = penum->rect.w, rh = penum->rect.h; in gx_image_enum_begin() 504 if (penum->rect.y) { in gx_image_enum_begin() 505 dda_advance(penum->dda.row.x, penum->rect.y); in gx_image_enum_begin() [all …]
|
| H A D | gximage2.c | 237 gs_int_rect rect; in gx_begin_image2() local 242 rect = idata.bbox; in gx_begin_image2() 248 rect.q.y = rect.p.y + 1; in gx_begin_image2() 258 (sdev, &rect, ¶ms, &unread); in gx_begin_image2() 289 (sdev, &rect, ¶ms, &unread); in gx_begin_image2() 308 rect.p.y = rect.q.y; in gx_begin_image2()
|
| H A D | gxshade4.c | 46 pfs->rect = *rect_clip; in mesh_init_fill_state() 77 pfs1.rect = pfs->rect; in Gt_fill_triangle() 95 gs_shading_FfGt_fill_rectangle(const gs_shading_t * psh0, const gs_rect * rect, in gs_shading_FfGt_fill_rectangle() argument 149 gs_shading_LfGt_fill_rectangle(const gs_shading_t * psh0, const gs_rect * rect, in gs_shading_LfGt_fill_rectangle() argument
|
| H A D | zdevice.c | 114 gs_int_rect rect; in zgetbitsrect() local 128 rect.p.x = op[-6].value.intval; in zgetbitsrect() 130 rect.p.y = op[-5].value.intval; in zgetbitsrect() 176 rect.q.x = rect.p.x + w; in zgetbitsrect() 177 rect.q.y = rect.p.y + h; in zgetbitsrect() 180 code = (*dev_proc(dev, get_bits_rectangle))(dev, &rect, ¶ms, NULL); in zgetbitsrect()
|
| H A D | gdevdrop.c | 110 gs_int_rect rect; in gx_default_strip_copy_rop() local 151 rect.p.x = x; in gx_default_strip_copy_rop() 152 rect.q.x = x + width; in gx_default_strip_copy_rop() 156 rect.p.y = py; in gx_default_strip_copy_rop() 157 rect.q.y = py + block_height; in gx_default_strip_copy_rop() 168 (dev, &rect, &bit_params, NULL); in gx_default_strip_copy_rop() 395 gs_int_rect rect; in mem_default_strip_copy_rop() local 497 rect.p.x = x; in mem_default_strip_copy_rop() 498 rect.q.x = x + width; in mem_default_strip_copy_rop() 506 rect.p.y = py; in mem_default_strip_copy_rop() [all …]
|
| /plan9/sys/src/cmd/unix/drawterm/libmemdraw/ |
| H A D | arc.c | 39 Rectangle rect; in memarc() local 73 rect = Rect(-a-w, -b-w, a+w+1, b+w+1); in memarc() 74 m = rect.max.x; /* inradius of bounding square */ in memarc() 75 if(m < rect.max.y) in memarc() 76 m = rect.max.y; in memarc() 95 wedge = allocmemimage(rect, GREY1); in memarc() 100 figure = allocmemimage(rect, GREY1); in memarc() 105 mask = allocmemimage(rect, GREY1); in memarc() 109 memimagedraw(mask, rect, figure, rect.min, wedge, rect.min, S); in memarc()
|
| /plan9/sys/src/libmemdraw/ |
| H A D | arc.c | 39 Rectangle rect; in memarc() local 73 rect = Rect(-a-w, -b-w, a+w+1, b+w+1); in memarc() 74 m = rect.max.x; /* inradius of bounding square */ in memarc() 75 if(m < rect.max.y) in memarc() 76 m = rect.max.y; in memarc() 95 wedge = allocmemimage(rect, GREY1); in memarc() 100 figure = allocmemimage(rect, GREY1); in memarc() 105 mask = allocmemimage(rect, GREY1); in memarc() 109 memimagedraw(mask, rect, figure, rect.min, wedge, rect.min, S); in memarc()
|
| /plan9/sys/src/cmd/rio/ |
| H A D | wctl.c | 311 wctlnew(Rectangle rect, char *arg, int pid, int hideit, int scrollit, char *dir, char *err) in wctlnew() argument 316 if(!goodrect(rect)){ in wctlnew() 333 i = allocimage(display, rect, screen->chan, 0, DWhite); in wctlnew() 335 i = allocwindow(wscreen, rect, Refbackup, DWhite); in wctlnew() 340 border(i, rect, Selborder, red, ZP); in wctlnew() 354 Rectangle rect; in writewctl() local 362 rect = rectsubpt(w->screenr, screen->r.min); in writewctl() 363 cmd = parsewctl(&arg, rect, &rect, &pid, &id, &hideit, &scrollit, &dir, x->data, err); in writewctl() 389 return wctlnew(rect, arg, pid, hideit, scrollit, dir, err); in writewctl() 395 rect = Rect(rect.min.x, rect.min.y, rect.min.x+Dx(w->screenr), rect.min.y+Dy(w->screenr)); in writewctl() [all …]
|
| /plan9/sys/src/cmd/vnc/ |
| H A D | rlist.c | 27 rlist->rect = realloc(rlist->rect, rlist->maxrect*sizeof(rlist->rect[0])); in growrlist() 28 if(rlist->rect == nil) in growrlist() 36 rl->rect[rl->nrect++] = r; in rappend() 49 r->rect[i] = r->rect[--r->nrect]; in rtrim() 177 r = tmp.rect[j]; in addtorlist() 180 ir = rlist->rect[i]; in addtorlist() 218 if(rectubr(&rlist->rect[i], cr)) in addtorlist() 246 free(r->rect); in freerlist() 250 r->rect = nil; in freerlist() 260 fprint(2, " %R", r->rect[i]); in rprint()
|
| /plan9/sys/src/games/music/jukebox/ |
| H A D | music.c | 306 vol1img = allocimage(display, vol->rect, screen->chan, 0, 0xe0e0ffff); in resizecontrolset() 307 vol2img = allocimage(display, vol->rect, screen->chan, 0, 0xe0e0ffff); in resizecontrolset() 308 pol[0] = Pt(vol->rect.min.x, vol->rect.max.y); in resizecontrolset() 309 pol[1] = Pt(vol->rect.max.x, vol->rect.min.y); in resizecontrolset() 310 pol[2] = vol->rect.max; in resizecontrolset() 327 new1img = allocimage(display, vol->rect, screen->chan, 0, 0xe0e0ffff); in resizecontrolset() 328 new2img = allocimage(display, vol->rect, screen->chan, 0, 0xe0e0ffff); in resizecontrolset() 329 pol[0] = Pt(vol->rect.min.x, vol->rect.max.y); in resizecontrolset() 330 pol[1] = Pt(vol->rect.max.x, vol->rect.min.y); in resizecontrolset() 331 pol[2] = vol->rect.max; in resizecontrolset() [all …]
|