1. An image forming apparatus comprising: a forming portion configured to form an image on an object based on image data, said object being capable of movement relative to said forming portion; a control portion configured to provide data of a pattern as said image data for said forming portion, said pattern including a plurality of mark pairs, each of said plurality of mark pairs including a mark of a reference color and a mark of an adjustive color, said plurality of mark pairs differing from one another in mark shift amount that is a shift amount of said adjustive-color mark from said reference-color mark; a light receiving portion configured to receive a light from a detection area, and generate a light sensitive waveform based on an amount of said light that varies with time while said pattern formed on said object moves across said detection area with said relative movement of said object; an extracting portion configured to extract a matched ideal waveform from a plurality of ideal waveforms based on degree of coincidence with said light sensitive waveform, said plurality of ideal waveforms differing from one another in phase; and a determining portion configured to determine, based on said matched ideal waveform, a displacement amount of an image to be formed of said adjustive color from an image to be formed of said reference color.