Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified util_make_irect() to capture area more robustly; #3167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20311,13 +20311,15 @@ def handle_args():

def util_make_irect( *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None):
a, b, c, d = util_make_rect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1)
def convert(x):
ret = int(x)
return ret
a = convert(a)
b = convert(b)
c = convert(c)
d = convert(d)
def convert(x, ceil):
if ceil:
return int(math.ceil(x))
else:
return int(math.floor(x))
a = convert(a, False)
b = convert(b, False)
c = convert(c, True)
d = convert(d, True)
return a, b, c, d


Expand Down
Loading