drothlis/stb-tester — pull request #179 by wmanley (2014-06-19 23:04:21+00:00)
Title: API: Include the region of the match, not just the position

`MatchResult.region` contains all the information that `position` does,
plus indicating the size of the matched area. This can be useful for OCR
which takes a region to read from. So with this change it's easy and
convenient to read the text next to a matching icon for instance:

text = ocr(region=wait_for_match('icon.png').region.extend(right=200))

This changes the arguments `MatchResult` constructor. This would be a
backwards compatibility break but `MatchResult`s should only be being
created by core stbt code and not by user code. Still this is something
to watch out for.

Users can still write `pos = match_result.position` so the user facing API
has not been broken.