{"id":21028893,"url":"https://github.com/chamons/ggez_render_squash","last_synced_at":"2025-10-19T17:14:15.688Z","repository":{"id":87165312,"uuid":"540860788","full_name":"chamons/ggez_render_squash","owner":"chamons","description":"Example of ggez \"squashing\" when using set_screen_coordinates","archived":false,"fork":false,"pushed_at":"2022-09-24T15:14:08.000Z","size":4944,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T19:16:28.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chamons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-24T14:42:04.000Z","updated_at":"2022-09-24T14:42:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc60eaa8-361d-4cb5-aaed-f36443c22450","html_url":"https://github.com/chamons/ggez_render_squash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chamons/ggez_render_squash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamons%2Fggez_render_squash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamons%2Fggez_render_squash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamons%2Fggez_render_squash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamons%2Fggez_render_squash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chamons","download_url":"https://codeload.github.com/chamons/ggez_render_squash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamons%2Fggez_render_squash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270951256,"owners_count":24674006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T11:59:34.074Z","updated_at":"2025-10-19T17:14:10.664Z","avatar_url":"https://github.com/chamons.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solution\n\nI'm leaving this up in case anyone else runs into it, but it appears that ggez or one of it's dependencies is including the title bar in the window resolution. So when you request 800x600 you don't get a window with that much usable space. \n\nThis means when you call `set_screen_coordinates` you get squashed since you \"lose\" the titlebar space, which is only in one axis.\n\nSome variant of this appears to fix it for me:\n\n```\ncanvas.set_screen_coordinates(graphics::Rect::new(\n    15.5,\n    15.5,\n    ctx.gfx.window().inner_size().width as f32 / scale as f32,\n    ctx.gfx.window().inner_size().height as f32 / scale as f32,\n));\n```\n\n# Problem\n\nWhen I set set_screen_coordinates to the same resolution as my window, I go from:\n\n![Normal](normal.png)\n\nto:\n\n![Squashed](squashed.png)\n\n# How to reproduce\n\n- Have a mac it seems (does not reproduce on my Windows box)\n- Sync repository\n- Set cargo.toml to a local copy of ggez to a recent devel branch 41d9abe\n- cargo run\n- Hit F1 to flip between the two modes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamons%2Fggez_render_squash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchamons%2Fggez_render_squash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamons%2Fggez_render_squash/lists"}