[gnome-panel/wip/segeiger/wanda-without-background] free-the-fish.c: Remove background from wanda.png
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/segeiger/wanda-without-background] free-the-fish.c: Remove background from wanda.png
- Date: Wed, 3 Jun 2015 20:38:11 +0000 (UTC)
commit 5c3fd11e456de2faeca0498e70ae5e690532545b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Jun 3 15:24:05 2015 +0300
free-the-fish.c: Remove background from wanda.png
* Remove the background from the wanda.png which is used for drawing
the animation.
* Store wanda.png in gnome-panel folder instead of aliasing it from
the applets folder.
* Remove the now useless/unneeded function that was used to remove
sea/background from the original wanda.png image.
Signed-off-by: Sebastian Geiger <sbastig gmx net>
gnome-panel/Makefile.am | 1 +
gnome-panel/free-the-fish.c | 29 +----------------------------
gnome-panel/panel.gresource.xml | 2 +-
gnome-panel/wanda.png | Bin 0 -> 10621 bytes
4 files changed, 3 insertions(+), 29 deletions(-)
---
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 1990355..9046365 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -260,6 +260,7 @@ EXTRA_DIST = \
$(uitest_FILES) \
panel-test-applets.gresource.xml \
panel-marshal.list \
+ wanda.png \
$(desktop_in_files)
CLEANFILES = \
diff --git a/gnome-panel/free-the-fish.c b/gnome-panel/free-the-fish.c
index 5076486..c49d383 100644
--- a/gnome-panel/free-the-fish.c
+++ b/gnome-panel/free-the-fish.c
@@ -16,7 +16,6 @@
#define FISH_Y_SPEED ((g_random_int() % 2) + 1)
#define FISH_X_SPEED_HIDE_FACTOR 2.5
#define FISH_Y_SPEED_HIDE_FACTOR 2.5
-#define FISH_PIXEL_STORE_MOVE(a, r, g, b) (a < 128 || (a < 255 && b > r && b > g))
/* Some important code copied from PonG */
typedef struct _FreeTheFish FreeTheFish;
@@ -174,30 +173,6 @@ out:
gtk_main_do_event (event);
}
-static void
-fish_unsea (cairo_surface_t *surface)
-{
- guchar *pixels = cairo_image_surface_get_data (surface);
- int rs = cairo_image_surface_get_stride (surface);
- int width = cairo_image_surface_get_width (surface);
- int height = cairo_image_surface_get_height (surface);
- int column, row;
- guint32 *current_pixel;
- guchar a, r, g, b;
-
- for (row = 0; row < height; row++, pixels += rs) {
- current_pixel = (guint32 *) pixels;
- for (column = 0; column < width; column++, current_pixel++) {
- a = (guchar) ((*current_pixel)>>24);
- r = (guchar) (((*current_pixel)>>16)&0xff);
- g = (guchar) (((*current_pixel)>> 8)&0xff);
- b = (guchar) (((*current_pixel)>> 0)&0xff);
- if (FISH_PIXEL_STORE_MOVE(a, r, g, b))
- *current_pixel = 0;
- }
- }
-}
-
static cairo_pattern_t *
get_fish_frame (GdkWindow *win, cairo_surface_t *source, int frame)
{
@@ -296,7 +271,7 @@ fish_init (void)
if (fish.window != NULL)
return;
- fish_pixbuf = gdk_pixbuf_new_from_resource ("/org/gnome/panel/anim/wanda.png", NULL);
+ fish_pixbuf = gdk_pixbuf_new_from_resource ("/org/gnome/panel/wanda.png", NULL);
if (fish_pixbuf == NULL)
return;
@@ -324,8 +299,6 @@ fish_init (void)
return;
}
- fish_unsea (surface);
-
orient = g_random_int() % 2;
fish.state = 0;
diff --git a/gnome-panel/panel.gresource.xml b/gnome-panel/panel.gresource.xml
index 85c4b28..c7f696e 100644
--- a/gnome-panel/panel.gresource.xml
+++ b/gnome-panel/panel.gresource.xml
@@ -3,7 +3,7 @@
<gresource prefix="/org/gnome/panel">
<file compressed="true">panel-properties-dialog.ui</file>
<file compressed="true">panel-run-dialog.ui</file>
- <file alias="anim/wanda.png">../applets/fish/wanda.png</file>
+ <file>wanda.png</file>
<file>Adwaita.css</file>
<file>HighContrast.css</file>
</gresource>
diff --git a/gnome-panel/wanda.png b/gnome-panel/wanda.png
new file mode 100644
index 0000000..f0f834d
Binary files /dev/null and b/gnome-panel/wanda.png differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]