Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个瓷砖网格(横向 200 和向下 200)。我想在屏幕视口内的屏幕上显示它们,并让用户用手指滚动以移动瓷砖。任何时候都只会在任一轴上显示 3-4 个图块。
所以,我的问题是,如果我有一个中心点,它是屏幕的中心。如何计算我需要绘制哪些图块并相对于中心绘制它们?
我知道这是一个基本问题,但我是图形编程的新手,找不到任何解释如何做到这一点的示例。