Created
April 1, 2019 23:20
-
-
Save Uberi/1b35e6b5eecfec2a9026a5549bdccd7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POINTS_PER_CHARACTER = 72.23 / 13 | |
def row_col_offset_to_xy_points(row, col, offset_x, offset_y, col_widths, row_heights): | |
pos_x = sum(col_widths[i] for i in range(col)) * POINTS_PER_CHARACTER + offset_x | |
pos_y = sum(row_heights[j] for j in range(row)) + offset_y | |
return (pos_x, pos_y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment