← Back to team overview

sikuli-driver team mailing list archive

[Question #678529]: How to create a Region from a Location

 

New question #678529 on Sikuli:
https://answers.launchpad.net/sikuli/+question/678529

Is there a simple way to create a region from a location - a region that has the given location at its center?

Like the inverse of getCenter()  where I can get the location of the center of a region?

Something like location.grow(num) which should give a quadratic region with the location as its center and side lenghts of num?

Of course one can do that with Region(Location.x - num//2, Location.y - num//2, num, num) or the like, I was just wondering whether there might be a "nicer", more direct way?

Thank you. 


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.