Deduplicate polygon parsing code


Not just to reduce number of lines but to avoid introcing
bugs by changing one copy while missing the other.

Change-Id: Icee25ba7df86092391bbbbf6e40a4065502e6a9f
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commitd736687035933979056a07956070f0c3c98a1d51
parent933b8d5305d95db27b46355a6bedb40cc91a12c0
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeThu, 13 Mar 2025 12:08:35 +0100