]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-image: add tiling support
authorRay Strode <rstrode@redhat.com>
Tue, 22 Oct 2013 22:36:15 +0000 (18:36 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 23 Oct 2013 19:55:52 +0000 (15:55 -0400)
This follow up commit adds tiling support to images, so
that splash screens can have been background patterns instead
of just background colors.

src/libply-splash-graphics/ply-image.c
src/libply-splash-graphics/ply-image.h

index be858095690a8d66b277219f328b52789ddd2107..7d21946344548b239a578040c8edcb170865a079 100644 (file)
@@ -254,6 +254,21 @@ ply_image_rotate (ply_image_t *image,
   return new_image;
 }
 
+ply_image_t *
+ply_image_tile (ply_image_t *image,
+                long         width,
+                long         height)
+{
+  ply_image_t *new_image;
+
+  new_image = ply_image_new (image->filename);
+
+  new_image->buffer = ply_pixel_buffer_tile (image->buffer,
+                                             width,
+                                             height);
+  return new_image;
+}
+
 ply_pixel_buffer_t *
 ply_image_get_buffer (ply_image_t *image)
 {
index 66fa520d0c378a0b92e938dde66149303baf7a30..5bda56741fdff559202103d18e445941da1ed480 100644 (file)
@@ -39,6 +39,7 @@ long ply_image_get_width (ply_image_t *image);
 long ply_image_get_height (ply_image_t *image);
 ply_image_t *ply_image_resize (ply_image_t *image, long width, long height);
 ply_image_t *ply_image_rotate (ply_image_t *oldimage, long center_x, long center_y, double theta_offset);
+ply_image_t *ply_image_tile (ply_image_t *image, long width, long height);
 ply_pixel_buffer_t *ply_image_get_buffer (ply_image_t *image);
 ply_pixel_buffer_t *ply_image_convert_to_pixel_buffer (ply_image_t *image);