Lines Matching refs:xy
595 int xy[2]; in crop_to_rect() member
602 win.xy[0] = cfg->win.x; win.xy[1] = cfg->win.y; in crop_to_rect()
604 crop.xy[0] = cfg->crop.x; crop.xy[1] = cfg->crop.y; in crop_to_rect()
613 crop.xy[1] -= (crop.wh[1] = -crop.wh[1]); in crop_to_rect()
615 crop.xy[!swap] -= (crop.wh[!swap] = -crop.wh[!swap]); in crop_to_rect()
617 crop.xy[swap] -= (crop.wh[swap] = -crop.wh[swap]); in crop_to_rect()
623 win.xy[c] + win.wh[c] <= vis.lt[c] || in crop_to_rect()
624 win.xy[c] >= vis.rb[c] || in crop_to_rect()
629 if (win.xy[c] < vis.lt[c]) { in crop_to_rect()
631 int a = (vis.lt[c] - win.xy[c]) * crop.wh[c ^ swap] / win.wh[c]; in crop_to_rect()
632 crop.xy[c ^ swap] += a; in crop_to_rect()
634 win.wh[c] -= vis.lt[c] - win.xy[c]; in crop_to_rect()
635 win.xy[c] = vis.lt[c]; in crop_to_rect()
638 if (win.xy[c] + win.wh[c] > vis.rb[c]) { in crop_to_rect()
639 crop.wh[c ^ swap] = crop.wh[c ^ swap] * (vis.rb[c] - win.xy[c]) / win.wh[c]; in crop_to_rect()
640 win.wh[c] = vis.rb[c] - win.xy[c]; in crop_to_rect()
649 crop.xy[!swap] -= (crop.wh[!swap] = -crop.wh[!swap]); in crop_to_rect()
651 crop.xy[swap] -= (crop.wh[swap] = -crop.wh[swap]); in crop_to_rect()
653 crop.xy[1] -= (crop.wh[1] = -crop.wh[1]); in crop_to_rect()
655 cfg->win.x = win.xy[0]; cfg->win.y = win.xy[1]; in crop_to_rect()
657 cfg->crop.x = crop.xy[0]; cfg->crop.y = crop.xy[1]; in crop_to_rect()