简体   繁体   English

为我绘制的画布设置缩放

[英]Set a zoom for my drawn canvas

I have an application which draws a maze using lines from 2 boolean arrays onto a canvas. 我有一个应用程序,它使用2个布尔数组中的线将迷宫绘制到画布上。 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. 我已经按需完成所有工作,但是我需要一种方法来设置缩放比例,使其仅显示5x5,而不是当前的迷宫尺寸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 谢谢

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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