1. A computer-implemented method for determining a mask pattern to be used on a photo-mask in a photolithographic process, comprising: determining, by a computer, a set of regions corresponding to different locations on a target pattern; representing a first mask pattern with a pixel based representation; determining a second mask pattern in accordance with the first mask pattern, the target pattern and a model of a photolithographic process, wherein the determining includes different treatment for different regions in the set of regions, wherein the determining involves an inverse optical calculation in which the second mask pattern in the model of the photolithographic process is calculated based on the model of the photolithographic process and information in an image at an output of the model of the photolithographic process, wherein determining the second mask pattern involves a rectilinear-projection operation having a minimum segment length, and wherein the rectilinear-projection operation conserves an area of features in the second mask pattern.