Cockatrice/cockatrice/src/interface/widgets/playmat
BruebachL bb0a96984d
[Game] Derive playmat sampling window from shared clamped helpers (#7159)
* [Game] Derive playmat sampling window from shared clamped helpers

The crop formula computed the sampled window inline with an unclamped
zoom floor, so stored vertical offsets below half of travel were dead
and extreme zooms could sample outside the art

Remap verticalOffset to place the window top edge within its travel,
floor zoom at visible width over min card side with a 4.0 ceiling,
clamp pan along the margin sum constant segment, and expose
playmatClampedZoom, playmatWindowSide and aspectFitRect so the game
renderer and any editor share one geometry model

Zoom 1 rendering is bit identical to before

Took 7 seconds

* Comments.

Took 29 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-23 17:26:15 +02:00
..
playmat_collection_dialog.cpp [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_collection_dialog.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_preview_widget.cpp [Game] Derive playmat sampling window from shared clamped helpers (#7159) 2026-08-23 17:26:15 +02:00
playmat_preview_widget.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_settings_dialog.cpp [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_settings_dialog.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_utils.h [Game] Derive playmat sampling window from shared clamped helpers (#7159) 2026-08-23 17:26:15 +02:00