When calculating stack, the measurement is made assuming that the front and rear drop outs are level. In this regard, yes, the fork length is factored in. The images you see may be skewed or angled, but the measurement is pretty standard.
The dropouts are level. A horizontal line, which is parallel to a line drawn between the center of the dropouts, is drawn through the center of the top of the headtube, and the distance from that line to the center of the bottom bracket is your stack.