A computer sets a process area based on an image obtained by observing a
mask, and determines the positions of representative points that form a
contour of the process area for each pixel with sub-pixel accuracy that
is better than a pixel, the position of each of the representative points
being able to be set to either the center position of the pixel or a
position displaced therefrom. Furthermore, for the pixels within the
process area, the computer sets the center positions of the pixels as the
representative points and corrects the positions of the representative
points of the pixels within the process area on a sub-pixel basis such
that nonuniformity between the representative points is reduced. When the
mask is processed, the charged particle beam is applied with sub-pixel
accuracy to the positions of the representative points that form the
contour for the pixels that includes the contour of the process area and
to the positions of the corrected representative points for the pixels
within the process area.