// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Fit artwork inside a display rectangle // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set image pixel dimensions and panel metre dimensions. Touch for owner-only output. // Stop / restore: Remove/disable. The script calculates only; no scene properties change. // Notes: Returns displayed width/height and symmetric margins; does not upload or apply an image. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. float IW=1920.0; float IH=1080.0; float PW=4.0; float PH=3.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(IW<=0.0||IH<=0.0||PW<=0.0||PH<=0.0) { llOwnerSay("Positive dimensions required."); return; } float scale=PW/IW; if(PH/IH