zoneminder/tests
Isaac Connor c0016fa00b feat: store zone coordinates as percentages for resolution independence
Convert zone coordinates from absolute pixel values to percentages
(0.00-100.00) so zones automatically adapt when monitor resolution
changes. This eliminates the need to manually reconfigure zones after
resolution adjustments.

Changes:
- Add DB migration (zm_update-1.37.81.sql) to convert existing pixel
  coords to percentages, recalculate area, and update Units default
- Add Zone::ParsePercentagePolygon() in C++ to parse percentage coords
  and convert to pixels at runtime using monitor dimensions
- Backwards compat: C++ Zone::Load() checks Units column and uses old
  pixel parser for legacy 'Pixels' zones
- Update PHP coordsToPoints/mapCoords/getPolyArea for float coords,
  replace scanline area algorithm with shoelace formula
- Update JS zone editor to work in percentage coordinate space with
  SVG viewBox "0 0 100 100" and non-scaling-stroke for consistent
  line thickness
- Position zone SVG overlay inside imageFeed container via JS to align
  with image only (not status bar)
- Support array of zone IDs in Monitor::getStreamHTML zones option
- Update monitor resize handler: percentage coords don't need rescaling,
  only threshold pixel counts are adjusted
- Add 8 Catch2 unit tests for ParsePercentagePolygon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:19:20 -05:00
..
data/fonts ZmFont: Store character padding in font file 2021-04-25 23:13:21 +02:00
CMakeLists.txt fix: fall back to pixel parsing when zone Units=Percent but coords exceed 100 2026-02-23 18:16:55 -05:00
main.cpp Update to Catch2 v3 2024-05-08 14:16:05 -04:00
zm_box.cpp Box: Make range calculations mathematically correct 2021-05-16 19:41:45 +02:00
zm_catch2.h Update to Catch2 v3 2024-05-08 14:16:05 -04:00
zm_comms.cpp Misc: Rename namespace ZM to zm 2021-06-06 19:11:11 +02:00
zm_crypt.cpp Crypto: Implement SHA1 hashing 2021-05-30 22:56:21 +02:00
zm_font.cpp tests/Font: Avoid lambda capture initialization 2021-05-24 00:55:46 +02:00
zm_onvif_renewal.cpp refactor: move format_absolute_time_iso8601 from zm_monitor_onvif to zm_time 2026-02-12 16:53:39 -05:00
zm_poly.cpp Polygon: Perform clip operation on existing object instead of returning a new clipped one 2021-05-16 19:42:41 +02:00
zm_utils.cpp Fix appending %% instead of % when uri decoding. Add test for URIEncode 2026-02-04 20:45:46 -05:00
zm_vector2.cpp Polygon: Implement clipping to a boundary box 2021-05-16 19:41:45 +02:00
zm_zone.cpp feat: store zone coordinates as percentages for resolution independence 2026-02-23 18:19:20 -05:00