When zones have Units='Percent' in the database but their Coords contain pixel values (>100), ParsePercentagePolygon treats them as percentages, causing wild scaling (e.g., 639% * 1920 / 100 = 12269) followed by clamping to monitor bounds, producing degenerate full-frame zones. Add a pre-check in Zone::Load that scans coordinate values before calling ParsePercentagePolygon. If any value exceeds 100, log a warning and use ParsePolygonString (pixel path) instead. Also add unit tests for both ParsePolygonString and ParsePercentagePolygon. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| data/fonts | ||
| CMakeLists.txt | ||
| main.cpp | ||
| zm_box.cpp | ||
| zm_catch2.h | ||
| zm_comms.cpp | ||
| zm_crypt.cpp | ||
| zm_font.cpp | ||
| zm_onvif_renewal.cpp | ||
| zm_poly.cpp | ||
| zm_utils.cpp | ||
| zm_vector2.cpp | ||
| zm_zone.cpp | ||