LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 06: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-11-2014, 12:54 AM   #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 09:59 PM
Learning clanlib: cannot get my first sprite to display CoderMan Programming 3 07-28-2009 07:58 AM
Sprite editor for game programming? CoderMan Programming 2 07-11-2009 02:02 AM
Sprite editor for spr files linuxmandrake Linux - Software 2 02-28-2006 07:25 AM
Sprite editor for spr files linuxmandrake Linux - Software 0 02-21-2006 05:07 AM


All times are GMT -5. The time now is 04:23 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