mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
Run the simulation in a fixed 800x600 world and map it into the widget with an object-fit: contain viewport, so rendering and mouse hit testing share one transform. Derive the draw scale from the canvas buffer and content box because the global scale read in the timer callback does not match the buffer DPI. Let the canvas fill the window instead of a fixed size and keep the fabric world unchanged on resize.
Fabric
基于 LCUI 和 Cario 实现的布料模拟程序。