使用 Raspberry Pi Imager 旋转系统,自动下载写入SD卡,比之前的命令行操作简单。
游戏引擎渲染图片或字体模糊
- 检查缩放是否抗锯齿
- 图片分辨率中存在奇数,锚点为(0.5,0.5),导致坐标为浮点
- 使用(0,0)作为锚点可避免坐标为浮点,但布局不方便
图片叠加参数备份
光图参数
cc.blendFunc(cc.backendBlendFactor.SRC_COLOR, cc.backendBlendFactor.DST_ALPHA)
MBP ubuntu从18升级到20启动错误修正
错误信息:
Failed to Set MokListRT: Invalid Parameter
Could not create mokListRT: Invalid Parameter
Importing MOK states has failed: import_mok_state() failed: Invalid Parameter
Continuing boot since secure mode is disabled.
修正:
sudo su -
cd /boot/efi/EFI/ubuntu
cp grubx64.efi shimx64.efi
reboot
参考:(Ubuntu 20.04 Failed to Set MokListRT: Invalid Parameter)[https://askubuntu.com/questions/1279602/ubuntu-20-04-failed-to-set-moklistrt-invalid-parameter]
无版权音乐网站
cocos2d-x 4.0 captureNode用法备份
-- 截取场景
cc.utils:captureNode(scene, function(image)
-- 图片转纹理
local texture = cc.Texture2D:new()
texture:initWithImage(image)
image:release()
-- 纹理创建精灵
local sp = cc.Sprite:createWithTexture(texture)
sp:addTo(scene):center()
end)
Cocos2d-x fgui坑点
Component 挂事件监听不遵循传播规则,总可以收到监听,透明区域的点击判断需要一个单独的透明图形来挂监听器。
GList不能挂事件监听,不然GList滚动行为不正常。
cocos creator active 为false的节点,收不到onDestroy事件
什么垃圾设计。
Cocos2d-x Tiled 纹理抖动和黑线
- 纹理 texture->setAliasTexParameters() 是可以防止黑线,但是移动地图的时候纹理抖动,
并且正常地图依然都移动出现黑线的记录,只是变小了。 - 精灵渲染开fixArtifacts防止黑线,配合纹理的setAntiAliasTexParameters,画面也不会抖动。
此方法适用于不缩小的地图。 - 限制摄像机移动?https://blog.csdn.net/gongyiling3468/article/details/47803619/
python ttk.Treeview 的TreeviewSelect虚事件有bug
如果有多个Treeview实例同时存在,分别都监听了虚事件<<TreeviewSelect>>
,
那么前面注册的回调会收到后面Treeview主持的虚事件,十分诡异。
不建议使用<<TreeviewSelect>>