PRESET
- 来源: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPreset
- 最后更新: 2016-03-13
绘制单个像素
语法
PReset [target ,] [STEP] (x, y) [,color]参数
target
指定要绘制的缓冲区。
STEP
表示坐标是相对坐标
(x, y)
像素坐标。
color
颜色属性。
说明
target 指定要绘制的缓冲区。target 可以是用 ImageCreate 或 Get (Graphics) 创建的图像。如果省略,target 默认为屏幕当前工作页面。
(x, y) 是像素坐标。如果存在 STEP,表示 (x, y) 坐标相对于图形光标位置。如果省略,(x, y) 相对于 target 的左上角。x 和 y 坐标受上次调用 View (Graphics) 和 Window 语句的影响,并遵守 View (Graphics) 语句设置的当前裁剪区域。
color 指定颜色属性。如果省略,color 默认为当前背景颜色。参见 Color。color 与图形模式相关,详情参见 Color 和 Screen (Graphics)。
示例
start GeSHi
vb
Screen 13
'Set background color to 15
Color , 15
'Draw a pixel with the background color at 10, 10
PReset (10,10)
'Draw a pixel with the background color at Last x cord +10, Last y cord +10
PReset Step (10,10)
Sleepend GeSHi
与 QB 的区别
target是 FreeBASIC 新增的
另请参阅
PSet
返回 目录