- 帖子
- 39
- 精华
- 0
- 积分
- 145
- 阅读权限
- 20
- 注册时间
- 2017-2-24
- 最后登录
- 2017-3-18
|
本帖最后由 brahmagupta 于 2017-3-5 14:24 编辑
笔记:
Blit:其意义是将一个平面的一部分或全部图象整块从这个平面复制到另一个平面(位块 传输)
和其他语言里的draw,plot什么的函数名还不太一样(效果一样,都是绘制图形)。
docs中的原文:
BLIT: Basically, blit means to copy graphics from one image to another. A more formal definition is to copy an array of data to a bitmapped array destination. You can think of blit as just "assigning" pixels. Much like setting values in our screen-list above, blitting assigns the color of pixels in our image.
以及screen的参数
Screen CoordinatesTo position an object on the screen, we need to tell the blit() function where to put the image. In pygame we always pass positions as an (X,Y) coordinate. This represents the number of pixels to the right, and the number of pixels down to place the image. The top-left corner of a Surface is coordinate (0, 0). Moving to the right a little would be (10, 0), and then moving down just as much would be (10, 10). When blitting, the position argument represents where the topleft corner of the source should be placed on the destination.
所以这个坐标值 应该是以左上角为像素原点 |
|