Measurement of 2D shapes