PSET(图形 Put)
- 来源: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPsetGfx
- 最后更新: 2023-07-09
Put 图形语句的参数,选择 PSet 作为位图传输方法
语法
Put [ target, ] [ STEP ] ( x,y ), source [ ,( x1,y1 )-( x2,y2 ) ], Pset参数
PSet
必填。
说明
PSet 方法将源像素值复制到目标像素上。
这是最简单的 Put 方法。目标缓冲区中的像素直接被源缓冲区中的像素覆盖。不执行额外操作,且没有被视为透明的颜色值。效果与逐个 PSet 每个像素相同。
示例
start GeSHi
vb
'' set up a screen: 320 * 200, 16 bits per pixel
ScreenRes 320, 200, 16
Line (0, 0)-(319, 199), RGB(0, 128, 255), bf
'' set up an image with the mask color as the background.
Dim img As Any Ptr = ImageCreate( 33, 33, RGB(255, 0, 255) )
Circle img, (16, 16), 15, RGB(255, 255, 0), , , 1, f
Circle img, (10, 10), 3, RGB( 0, 0, 0), , , 2, f
Circle img, (23, 10), 3, RGB( 0, 0, 0), , , 2, f
Circle img, (16, 18), 10, RGB( 0, 0, 0), 3.14, 6.28
Dim As Integer x = 160 - 16, y = 100 - 16
'' Put the image with PSET
Put (x, y), img, PSet
'' free the image memory
ImageDestroy img
'' wait for a keypress
Sleepend GeSHi
与 QB 的区别
- 无
另请参阅
PSetPut (Graphics)
返回 目录