1. A method of optical proximity correction, comprising: providing a layout pattern, wherein the layout pattern comprises a plurality of separately disposed feature patterns; providing at least one of the feature patterns to a computer system; defining at least a first template and a second template so that portions of the feature pattern are located in the first template and the rest of the feature pattern is located in the second template, wherein the first template and the second template have a common boundary; defining a first calculation zone, wherein the first calculation zone overlaps an entire first template and portions of the feature pattern out of the first template; fragmenting edges of the feature pattern within the first calculation zone from the common boundary towards two ends of the feature pattern so as to generate at least two first beginning segments respectively at two sides of the common boundary; and adjusting positions of the first beginning segments so as to generate first adjusted segments.