Lines Matching refs:wh
785 int wh[2]; in crop_to_rect() member
792 win.wh[0] = cfg->win.w; win.wh[1] = cfg->win.h; in crop_to_rect()
794 crop.wh[0] = cfg->crop.w; crop.wh[1] = cfg->crop.h; 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()
811 if (win.wh[c] <= 0 || vis.rb[c] <= vis.lt[c] || in crop_to_rect()
812 win.xy[c] + win.wh[c] <= vis.lt[c] || in crop_to_rect()
814 !crop.wh[c ^ swap]) in crop_to_rect()
820 int a = (vis.lt[c] - win.xy[c]) * crop.wh[c ^ swap] / win.wh[c]; in crop_to_rect()
822 crop.wh[c ^ swap] -= a; in crop_to_rect()
823 win.wh[c] -= vis.lt[c] - win.xy[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()
832 if (!crop.wh[c ^ swap] || !win.wh[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()
845 cfg->win.w = win.wh[0]; cfg->win.h = win.wh[1]; in crop_to_rect()
847 cfg->crop.w = crop.wh[0]; cfg->crop.h = crop.wh[1]; in crop_to_rect()