LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2014, 05:35 PM   #1
Rusakov
LQ Newbie
 
Registered: Aug 2013
Distribution: Kubuntu
Posts: 13

Rep: Reputation: Disabled
Question Just how do I get a Plymouth sprite to rotate?


I'm working on a Plymouth splash for Kubuntu. I want it to consist of a sprite centered on the screen that rotates. But no matter what I do the sprite doesn't rotate. Here's one version of the script I tested:

Code:
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);

time = 0;

fun refresh_callback ()
{
time++;
theta = time / 100;
spiral_sprite.Rotate(Math.Sin(theta) * 200);
}
Plymouth.SetRefreshFunction (refresh_callback);
I don't know what I'm doing wrong here.
 
Old 01-10-2014, 11:54 PM   #2
Rusakov
LQ Newbie
 
Registered: Aug 2013
Distribution: Kubuntu
Posts: 13

Original Poster
Rep: Reputation: Disabled
Bump. Here's a newer script:

Code:
spiral_image = Image("Splash.png");
spiral_sprite = Sprite(spiral_image);

screen_width = Window.GetWidth();
screen_height = Window.GetHeight();

spiral_sprite.SetX(screen_width /2 - spiral_image.GetWidth() /2);
spiral_sprite.SetY(screen_height /2 - spiral_image.GetHeight() /2);
spiral_sprite.sprite.SetPosition(spiral_sprite.SetX, spiral_sprite.SetY, 0);

time = 0;

fun refresh_callback ()
{
time++;
spiral_sprite.SetImage(spiral_image.Rotate(Math.Sin() * time));
}
Plymouth.SetRefreshFunction (refresh_callback);
It still doesn't rotate though.
 
  


Reply

Tags
kubuntu, plymouth, splash


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Log rotate not rotate newFreeBSD Linux - Server 13 09-12-2013 08:59 PM
Learning clanlib: cannot get my first sprite to display CoderMan Programming 3 07-28-2009 06:58 AM
Sprite editor for game programming? CoderMan Programming 2 07-11-2009 01:02 AM
Sprite editor for spr files linuxmandrake Linux - Software 2 02-28-2006 06:25 AM
Sprite editor for spr files linuxmandrake Linux - Software 0 02-21-2006 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration