1. A pattern inspection apparatus for inspecting a pattern to-be-inspected by using an image of said pattern to-be-inspected and data for fabricating said pattern to-be-inspected, said pattern inspection apparatus comprising: a reference pattern generation device configured to generate a reference pattern represented by one or more lines from said data, each of said one or more lines comprising one of a line segment and a curve; an image generation device configured to generate said image of said pattern to-be-inspected; a detecting device configured to detect an edge of said image of said pattern to-be-inspected; and an inspection device configured to inspect said pattern to-be-inspected by comparing said edge of said image of said pattern to-be-inspected with said one or more lines of said reference pattern.