Ru1*_*138 2 linux splash-screen
我正在为 Kubuntu 定制 Plymouth 喷溅。我试图在系统加载时使图像旋转。我已经使用重新启动和 X11 插件对其进行了测试,但均未成功。这是 .script 文件:
spiral_image = Image("Splash.png");
spiral_sprite = Sprite(spiral_image);
spiral_sprite.SetX(window.GetWidth() /2 - spiral_image.GetWidth() /2);
spiral_sprite.SetY(window.GetHeight() /2 - spiral_image.GetHeight() /2);
fun refresh_callback ()
{
time++;
theta = time / 100;
spiral_sprite.Rotate(theta);
}
Plymouth.SetRefreshFunction (refresh_callback);
Run Code Online (Sandbox Code Playgroud)
您需要旋转图像,而不是精灵:
fun refresh_callback () {
time++;
theta = time / 100;
spiral_sprite.SetImage( spiral_image.Rotate(theta) );
}
Run Code Online (Sandbox Code Playgroud)
根据官方文档,以防有人在设法找到普利茅斯文档之前发现这个问题。
(额外说明,稍微偏离主题:文档说默认文本颜色是白色。不要太指望它,它是黑色的。)
| 归档时间: |
|
| 查看次数: |
1896 次 |
| 最近记录: |