Lines Matching refs:xy
784 int xy[2]; in crop_to_rect() member
791 win.xy[0] = cfg->win.x; win.xy[1] = cfg->win.y; in crop_to_rect()
793 crop.xy[0] = cfg->crop.x; crop.xy[1] = cfg->crop.y; in crop_to_rect()
802 crop.xy[1] -= (crop.wh[1] = -crop.wh[1]); in crop_to_rect()
804 crop.xy[!swap] -= (crop.wh[!swap] = -crop.wh[!swap]); in crop_to_rect()
806 crop.xy[swap] -= (crop.wh[swap] = -crop.wh[swap]); in crop_to_rect()
812 win.xy[c] + win.wh[c] <= vis.lt[c] || in crop_to_rect()
813 win.xy[c] >= vis.rb[c] || in crop_to_rect()
818 if (win.xy[c] < vis.lt[c]) { in crop_to_rect()
820 int a = (vis.lt[c] - win.xy[c]) * crop.wh[c ^ swap] / win.wh[c]; in crop_to_rect()
821 crop.xy[c ^ swap] += a; in crop_to_rect()
823 win.wh[c] -= vis.lt[c] - win.xy[c]; in crop_to_rect()
824 win.xy[c] = vis.lt[c]; in crop_to_rect()
827 if (win.xy[c] + win.wh[c] > vis.rb[c]) { in crop_to_rect()
828 crop.wh[c ^ swap] = crop.wh[c ^ swap] * (vis.rb[c] - win.xy[c]) / win.wh[c]; in crop_to_rect()
829 win.wh[c] = vis.rb[c] - win.xy[c]; in crop_to_rect()
838 crop.xy[!swap] -= (crop.wh[!swap] = -crop.wh[!swap]); in crop_to_rect()
840 crop.xy[swap] -= (crop.wh[swap] = -crop.wh[swap]); in crop_to_rect()
842 crop.xy[1] -= (crop.wh[1] = -crop.wh[1]); in crop_to_rect()
844 cfg->win.x = win.xy[0]; cfg->win.y = win.xy[1]; in crop_to_rect()
846 cfg->crop.x = crop.xy[0]; cfg->crop.y = crop.xy[1]; in crop_to_rect()