{"id":"frontend.yui--CreateYuiFluidCanvasViewportForClientSize","name":"CreateYuiFluidCanvasViewportForClientSize","owner":"yeho","package":"frontend.yui","kind":"function","signature":"external CreateYuiFluidCanvasViewportForClientSize(int fallbackWidth, int fallbackHeight, int clientWidth, int clientHeight) returns yuiCanvasViewport","description":"Create yui fluid canvas viewport for client size from the supplied values.","context":"Turn YUI models into a working frontend and its rendering/input adapters.","parameters":[{"name":"fallbackWidth","type":"int","description":"Supply fallback width as int."},{"name":"fallbackHeight","type":"int","description":"Supply fallback height as int."},{"name":"clientWidth","type":"int","description":"Supply client width as int."},{"name":"clientHeight","type":"int","description":"Supply client height as int."}],"returns":"yuiCanvasViewport","members":[],"tags":["cpu","frontend","frontend.yui","function","source-example","yeho","yui"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/frontend/yui/geometry.yh","line":100,"sha256":"7e3835538a80425721ce9b04b55aa34fc6ca1d057d7575876869f1d442c226d2"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use CreateYuiFluidCanvasViewportForClientSize","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using frontend.yui\n\n// Turn YUI models into a working frontend and its rendering/input adapters.\nint fallbackWidth = 1\nint fallbackHeight = 1\nint clientWidth = 1\nint clientHeight = 1\nyuiCanvasViewport result = CreateYuiFluidCanvasViewportForClientSize(fallbackWidth, fallbackHeight, clientWidth, clientHeight)\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.frontend_yui__createyuifluidcanvasviewportforclientsize\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"frontend.yui\"\nversion = \"0.2.0\"\npath = \"../../../yeho/packages/frontend/yui\"\n\n[[dependencies]]\npackage = \"graphics.canvas\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/canvas\"\n\n[[dependencies]]\npackage = \"graphics.image\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/image\"\n\n[[dependencies]]\npackage = \"graphics.image.processing\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/image/processing\"\n\n[[dependencies]]\npackage = \"graphics.text\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/text\"\n\n[[dependencies]]\npackage = \"host.ui_services\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/ui_services\"\n\n[[dependencies]]\npackage = \"input.text\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/input/text\"\n\n[[dependencies]]\npackage = \"ui\"\nversion = \"0.2.0\"\npath = \"../../../yeho/packages/ui\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"5451737df36df129ce97f42478d69d6180c8118e883eaed8f928ac6b4456271b","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=frontend.yui--CreateYuiFluidCanvasViewportForClientSize","json":"https://demonhunterlabs.com/reference/items/frontend.yui--CreateYuiFluidCanvasViewportForClientSize.json","markdown":"https://demonhunterlabs.com/reference/text/frontend.yui--CreateYuiFluidCanvasViewportForClientSize.md"}
