1. A method of inserting dummy patterns, the method comprising: providing a window area comprising a main pattern, wherein the main pattern comprises first patterns of a first type of features, and second patterns of a second type of features, and wherein the first and the second types are different types; globally inserting first dummy patterns throughout the window area, wherein the first dummy patterns are dummy patterns of the first type of features; enlarging the main pattern to generate an enlarged main pattern, wherein the enlarged main pattern occupies an enlarged region of the window area; removing the portion of the first dummy patterns in the enlarged region from the first dummy patterns to generate first inversed dummy patterns; and combining the first patterns in the main pattern with the first inversed dummy patterns to generate first mask patterns for the first type of features.