Commit f9a02d23 authored by Cosimo Cecchi's avatar Cosimo Cecchi

all: don't use eel_round()

Just use floor().
parent 09b52b53
......@@ -30,6 +30,7 @@
#include "eel-graphic-effects.h"
#include "eel-glib-extensions.h"
#include <math.h>
#include <string.h>
/* shared utility to create a new pixbuf from the passed-in one */
......@@ -183,9 +184,9 @@ eel_create_colorized_pixbuf (GdkPixbuf *src,
&& gdk_pixbuf_get_n_channels (src) == 4), NULL);
g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (src) == 8, NULL);
red_value = eel_round (color->red * 255);
green_value = eel_round (color->green * 255);
blue_value = eel_round (color->blue * 255);
red_value = (gint) floor (color->red * 255);
green_value = (gint) floor (color->green * 255);
blue_value = (gint) floor (color->blue * 255);
dest = create_new_pixbuf (src);
......
......@@ -120,8 +120,8 @@
#define SNAP_HORIZONTAL(func,x) ((func ((double)((x) - DESKTOP_PAD_HORIZONTAL) / SNAP_SIZE_X) * SNAP_SIZE_X) + DESKTOP_PAD_HORIZONTAL)
#define SNAP_VERTICAL(func, y) ((func ((double)((y) - DESKTOP_PAD_VERTICAL) / SNAP_SIZE_Y) * SNAP_SIZE_Y) + DESKTOP_PAD_VERTICAL)
#define SNAP_NEAREST_HORIZONTAL(x) SNAP_HORIZONTAL (eel_round, x)
#define SNAP_NEAREST_VERTICAL(y) SNAP_VERTICAL (eel_round, y)
#define SNAP_NEAREST_HORIZONTAL(x) SNAP_HORIZONTAL (floor, x + .5)
#define SNAP_NEAREST_VERTICAL(y) SNAP_VERTICAL (floor, y + .5)
#define SNAP_CEIL_HORIZONTAL(x) SNAP_HORIZONTAL (ceil, x)
#define SNAP_CEIL_VERTICAL(y) SNAP_VERTICAL (ceil, y)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment