我正在为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);
答案 0 :(得分:4)
你需要旋转图像,而不是精灵:
fun refresh_callback () {
time++;
theta = time / 100;
spiral_sprite.SetImage( spiral_image.Rotate(theta) );
}
根据official documentation,如果有人在找到Plymouth文档之前发现了这个问题。
(额外说明,稍微偏离主题:文档说默认文本颜色为白色。不要太依赖它,它是黑色的。)