关于 PyS60 中 Canvas 中的可选参数

发布于 2024-07-14 00:01:39 字数 254 浏览 8 评论 0原文

Python for Symbian60 中,blit() 定义为:

blit(image [,target= (0,0), source=((0,0),image.size), mask=None, scale=0 ])

可选参数source中image.size的意义是什么?

In Python for Symbian60 blit() is defined as:

blit(image [,target=(0,0), source=((0,0),image.size), mask=None, scale=0 ])

In the optional parameter source what is the significance of image.size?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧伤还要旧人安 2024-07-21 00:01:40

认为source=((0,0))是左上角,image.size是右下角。 你可以将这两点之间的任何内容进行位块传输。

顺便说一句,目标类似。

Think that source=((0,0)) is the top left corner and image.size is the bottom right corner. You blit whatever is between those two points.

Similar for target, btw.

风吹短裙飘 2024-07-21 00:01:39

我的猜测是,当您不指定任何其他内容时, blit() 将自动使用 image.size 的结果(从而将整个图像从 (0,0) 传输到 (width,height) )。

如果您只想复制图像的一小部分,可以使用 source 参数定义要复制的不同矩形。

My guess is that blit() will automatically use the result of image.size when you don't specify anything else (and thus blitting the whole image from (0,0) to (width,height)).

If you want only a smaller part of the image copied, you can use the source parameter to define a different rectangle to copy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文