summaryrefslogtreecommitdiffstats
path: root/src/splash-plugins
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-06-12 14:00:56 -0400
committerRay Strode <rstrode@redhat.com>2008-06-12 14:08:51 -0400
commit67c4f66db06198a8bc2ded071ea46fb0bdafd0bf (patch)
treea1c0507c13bf6aea4be9c8f551b2f749acfd4494 /src/splash-plugins
parente8a24328ae9e82a943d7bff964824f1c50ea7e9d (diff)
downloadplymouth-67c4f66db06198a8bc2ded071ea46fb0bdafd0bf.tar.gz
plymouth-67c4f66db06198a8bc2ded071ea46fb0bdafd0bf.tar.xz
plymouth-67c4f66db06198a8bc2ded071ea46fb0bdafd0bf.zip
track logo area in spinfinity plugin state
Diffstat (limited to 'src/splash-plugins')
-rw-r--r--src/splash-plugins/spinfinity/plugin.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/splash-plugins/spinfinity/plugin.c b/src/splash-plugins/spinfinity/plugin.c
index 91e0407..79b7de2 100644
--- a/src/splash-plugins/spinfinity/plugin.c
+++ b/src/splash-plugins/spinfinity/plugin.c
@@ -68,7 +68,7 @@ struct _ply_boot_splash_plugin
{
ply_event_loop_t *loop;
ply_frame_buffer_t *frame_buffer;
- ply_frame_buffer_area_t box_area, lock_area;
+ ply_frame_buffer_area_t box_area, lock_area, logo_area;
ply_image_t *logo_image;
ply_image_t *bullet_image;
ply_image_t *lock_image;
@@ -155,23 +155,22 @@ draw_background (ply_boot_splash_plugin_t *plugin,
static void
draw_logo (ply_boot_splash_plugin_t *plugin)
{
- ply_frame_buffer_area_t logo_area;
uint32_t *logo_data;
long width, height;
width = ply_image_get_width (plugin->logo_image);
height = ply_image_get_height (plugin->logo_image);
logo_data = ply_image_get_data (plugin->logo_image);
- ply_frame_buffer_get_size (plugin->frame_buffer, &logo_area);
- logo_area.x = (logo_area.width / 2) - (width / 2);
- logo_area.y = (logo_area.height / 2) - (height / 2);
- logo_area.width = width;
- logo_area.height = height;
+ ply_frame_buffer_get_size (plugin->frame_buffer, &plugin->logo_area);
+ plugin->logo_area.x = (plugin->logo_area.width / 2) - (width / 2);
+ plugin->logo_area.y = (plugin->logo_area.height / 2) - (height / 2);
+ plugin->logo_area.width = width;
+ plugin->logo_area.height = height;
ply_frame_buffer_pause_updates (plugin->frame_buffer);
- draw_background (plugin, &logo_area);
+ draw_background (plugin, &plugin->logo_area);
ply_frame_buffer_fill_with_argb32_data (plugin->frame_buffer,
- &logo_area, 0, 0,
+ &plugin->logo_area, 0, 0,
logo_data);
ply_frame_buffer_unpause_updates (plugin->frame_buffer);
}
@@ -196,7 +195,7 @@ start_animation (ply_boot_splash_plugin_t *plugin)
plugin->loop,
plugin->window,
area.width / 2.0 - width / 2.0,
- area.width / 2.0 - height / 2.0);
+ area.height / 2.0 - height / 2.0);
}
static void