A method is provided for correcting rule violating areas of a photomask
using a digital representation of the photomask. The method includes
identifying violating areas of the photomask from a digital
representation of the photomask. The violating areas include areas that
violate a minimum width rule and/or areas that violate a minimum space
rule for the photomask. The violating areas are then manipulated for the
purpose of eliminating the violating areas. They are manipulated
differently based on whether the violating area lies inside a design
shape of a layout pattern to be imaged using the photomask and/or whether
the violating area lies outside the design shape.