简体   繁体   中英

Set a zoom for my drawn canvas

I have an application which draws a maze using lines from 2 boolean arrays onto a canvas. I have got this all working as it should, however I need a way to set the zoom so it only ever shows 5x5 instead of the current maze size of 50x50.

A little further information - the user circle will always be in the center of the maze and when he move in any direction the next section of the maze would be displayed. Please view my previous questions for some code snippets which may be useful.

Previous Question Code Snippets

Any help/ guidence here would be much appreciated. Thanks

我回答了我自己的问题,我的动作中有一个小错误,该错误是针对缩放大小而不是数组大小进行检查的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM