{"id":"frontend.yui--yuiCanvasViewport","name":"yuiCanvasViewport","owner":"yeho","package":"frontend.yui","kind":"thing","signature":"external thing yuiCanvasViewport","description":"A yui canvas viewport record carrying designWidth, designHeight, windowWidth, windowHeight, scale, and related state.","context":"Turn YUI models into a working frontend and its rendering/input adapters.","parameters":[],"returns":"void","members":[{"name":"designWidth","kind":"field","type":"int","description":"Stores design width as int.","signature":"int designWidth","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"designHeight","kind":"field","type":"int","description":"Stores design height as int.","signature":"int designHeight","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"windowWidth","kind":"field","type":"int","description":"Stores window width as int.","signature":"int windowWidth","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"windowHeight","kind":"field","type":"int","description":"Stores window height as int.","signature":"int windowHeight","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"scale","kind":"field","type":"int","description":"Stores scale as int.","signature":"int scale","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"offsetX","kind":"field","type":"int","description":"Stores offset x as int.","signature":"int offsetX","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"offsetY","kind":"field","type":"int","description":"Stores offset y as int.","signature":"int offsetY","tags":["thing","field","frontend.yui"],"updated":"2026-09-09"},{"name":"yuiCanvasViewport","kind":"constructor","parameters":[{"name":"designWidth","type":"int","description":"Design width."},{"name":"designHeight","type":"int","description":"Design height."},{"name":"windowWidth","type":"int","description":"Window width."},{"name":"windowHeight","type":"int","description":"Window height."},{"name":"scale","type":"int","description":"Scale."},{"name":"offsetX","type":"int","description":"Offset x."},{"name":"offsetY","type":"int","description":"Offset y."}],"returns":"void","signature":"yuiCanvasViewport(int designWidth, int designHeight, int windowWidth, int windowHeight, int scale, int offsetX, int offsetY)","description":"Yui canvas viewport.","tags":["thing","constructor","frontend.yui"],"updated":"2026-09-09"},{"name":"Describe","kind":"method","parameters":[],"returns":"text","signature":"Describe() returns text","description":"Describe.","tags":["thing","method","frontend.yui"],"exampleId":"method-Describe-8","updated":"2026-09-09"}],"tags":["cpu","frontend","frontend.yui","method","source-example","thing","yeho","yui"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/frontend/yui/geometry.yh","line":5,"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 yuiCanvasViewport","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.\nyuiCanvasViewport sample = yuiCanvasViewport(1, 1, 1, 1, 1, 1, 1)\nConsole.Log(Text.From(sample.designWidth))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.frontend_yui__yuicanvasviewport\"\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":"98b783fe0dc7af896a8e3e11b8222d50510f388af460cd115f1ec53a90d68992","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-8","title":"yuiCanvasViewport.Describe","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using frontend.yui\n\n// Describe.\nyuiCanvasViewport instance = yuiCanvasViewport(1, 1, 1, 1, 1, 1, 1)\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.frontend_yui__yuicanvasviewport\"\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","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"aa0ec9a8d4ff5be2df4712420d45300c9dbee22d862a46f76e059e61a59240e1","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["designWidth","designHeight","windowWidth","windowHeight","scale","offsetX","offsetY","yuiCanvasViewport","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=frontend.yui--yuiCanvasViewport","json":"https://demonhunterlabs.com/reference/items/frontend.yui--yuiCanvasViewport.json","markdown":"https://demonhunterlabs.com/reference/text/frontend.yui--yuiCanvasViewport.md"}
