Guided by analogy with Euler's spherical excess formula, we define a finite-additive functional on bounded convex polygons in ℝ2 (the Euler functional). Under certain smoothness assumptions, we find some sufficient conditions when this functional can be extended to a planar signed measure. A dual reformulation of these conditions leads to signed measures in the space of lines in ℝ2. In this way we obtain two sets of conditions which ensure that a segment function corresponds to a signed measure in the space of lines. The latter conditions are also necessary.