基本操作之——Object替换

replace_obj — Replaces one or more elements of an iconic object tuple.  替换图形数组中一个或多个对象

* replace_obj算子使用
*
dev_update_off ()
dev_close_window ()
dev_open_window (0, 0, 640, 480, 'white', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
*
* 加载图像集
read_image (ImagesFood, ['food/vegetables/apple_1','food/vegetables/carrot_1','food/vegetables/blueberry_1'])
*
* 显示图像数组中的所有图像
tile_images (ImagesFood, TiledImage, 1, 'vertical')
dev_display (TiledImage)
dev_disp_text ('Starting with three images.', 'window', 'top', 'left', 'black', 'box_color','#00ffffc4')
stop ()
*
*把第二幅图换成草莓,第四幅图追加树莓
read_image (ImagesReplace, ['food/vegetables/strawberry_1','food/vegetables/raspberry_1'])
replace_obj (ImagesFood, ImagesReplace, ImagesFruits, [2,4])
tile_images (ImagesFruits, ImagesTiled, 1, 'vertical')
dev_display (ImagesTiled)
dev_disp_text ('把第二幅图换成草莓,第四幅图追加树莓', 'window', 'top', 'left', 'black', 'box_color','#00ffffc4')

 

 

posted @   echo-efun  阅读(63)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示