2014-02-05 38 views

回答

0

这个伪代码应该得到你要寻找的值:

resolution_width = 720; 
resolution_height = 1280; 

input_x = 600; 
input_y = 500; 

target_width = 1080; 
target_height = 1920; 

percent_width = input_x/resolution_width; 
percent_height = input_y/resolution_height; 

output_x = target_width * percent_width; 
output_y = target_height * percent_height;