You can buy this project and download/modify it how often you want.
Pattern Region Test, A patternRegion, x, y, width, height Pattern (4 times actual size) Exact Fit in patternRegion patternRegion offset to the left patternRegion offset to the top patternRegion offset to the top/left patternRegion wider than content patternRegion higher than content patternRegion higher than content