remove trailing whitespace from ops

parent 3d438df3
......@@ -15,7 +15,7 @@
*
* Copyright 2006 Dominik Ernst
*
* Reflect an image about a line, whose direction is specified by the
* Reflect an image about a line, whose direction is specified by the
* vector that is defined by the x and y properties.
*/
......@@ -25,9 +25,9 @@
#ifdef GEGL_CHANT_PROPERTIES
gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
_("Direction vector's x component"))
gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
_("Direction vector's y component"))
#else
......
......@@ -86,7 +86,7 @@ static void c2g (GeglBuffer *src,
FALSE, /* same spray */
rgamma,
min, max);
{
{
/* this should be replaced with a better/faster projection of
* pixel onto the vector spanned by min -> max, currently
* computed by comparing the distance to min with the sum
......@@ -106,7 +106,7 @@ static void c2g (GeglBuffer *src,
denominator = sqrt (denominator);
denominator = nominator + denominator;
if (denominator>0.000)
if (denominator>0.000)
{
dst_buf[dst_offset+0] = nominator/denominator;
}
......
......@@ -294,7 +294,7 @@ fattal02_calculate_defect (gfloat *D,
n = (y == 0 ? 0 : y - 1),
s = (y + 1 == sy ? y : y + 1),
e = (x + 1 == sx ? x : x + 1);
_P (D, extent_d, x, y) = _P (F, extent_f, x, y) - (
_P (U, extent_u, e, y) +
_P (U, extent_u, w, y) +
......
......@@ -399,8 +399,8 @@ static void prepare (GeglOperation *operation)
gfloat fir_radius_x = fir_calc_convolve_matrix_length (o->std_dev_x) / 2;
gfloat fir_radius_y = fir_calc_convolve_matrix_length (o->std_dev_y) / 2;
gfloat iir_radius_x = o->std_dev_x * RADIUS_SCALE;
gfloat iir_radius_y = o->std_dev_y * RADIUS_SCALE;
gfloat iir_radius_x = o->std_dev_x * RADIUS_SCALE;
gfloat iir_radius_y = o->std_dev_y * RADIUS_SCALE;
/* XXX: these should be calculated exactly considering o->filter, but we just
* make sure there is enough space */
......@@ -464,7 +464,7 @@ process (GeglOperation *operation,
iir_young_ver_blur (temp, &temp_extend, output, result, B, b);
}
else
{
{
cmatrix_len = fir_gen_convolve_matrix (o->std_dev_y, &cmatrix);
fir_ver_blur (temp, &temp_extend, output, result, cmatrix, cmatrix_len,
op_area->top);
......
......@@ -160,7 +160,7 @@ prepare (GeglOperation *operation)
"path", o->src,
NULL);
}
/* Currently not using the composite op, reinsert it */
if (!self->cached_path)
gegl_node_link_many (self->input, self->composite_op, self->output, NULL);
......
......@@ -79,7 +79,7 @@ get_bounding_box (GeglOperation *operation)
return result;
}
static GeglRectangle
static GeglRectangle
get_cached_region (GeglOperation *operation,
const GeglRectangle *roi)
{
......
......@@ -71,28 +71,28 @@ process (GeglOperation *operation,
GeglInterpolation interpolation;
GeglBufferIterator *it;
gint index_in, index_out, index_coords;
format_io = babl_format ("RGBA float");
format_coords = babl_format_n (babl_type ("float"), 2);
interpolation = gegl_buffer_interpolation_from_string ("cubic");
desired_type = gegl_sampler_type_from_interpolation (interpolation);
sampler = g_object_new (desired_type,
"format", format_io,
"buffer", input,
NULL);
gegl_sampler_prepare (sampler);
gegl_sampler_prepare (sampler);
if (aux != NULL)
{
it = gegl_buffer_iterator_new (output, result, format_io, GEGL_BUFFER_WRITE);
index_out = 0;
index_coords = gegl_buffer_iterator_add (it, aux, result, format_coords, GEGL_BUFFER_READ);
index_in = gegl_buffer_iterator_add (it, input, result, format_io, GEGL_BUFFER_READ);
while (gegl_buffer_iterator_next (it))
{
gint i;
......@@ -102,7 +102,7 @@ process (GeglOperation *operation,
gfloat *in = it->data[index_in];
gfloat *out = it->data[index_out];
gfloat *coords = it->data[index_coords];
for (i=0; i<n_pixels; i++)
{
if (coords[0] > 0 && coords[1] > 0)
......@@ -127,11 +127,11 @@ process (GeglOperation *operation,
out[2] = 0.0;
out[3] = 0.0;
}
coords += 2;
in += 4;
out += 4;
/* update x and y coordinates */
x++;
if (x >= (it->roi->x + it->roi->width))
......@@ -142,15 +142,15 @@ process (GeglOperation *operation,
}
}
}
else
{
gegl_buffer_copy (input, result, output, result);
}
g_object_unref (sampler);
return TRUE;
}
......@@ -166,9 +166,9 @@ gegl_chant_class_init (GeglChantClass *klass)
composer_class->process = process;
operation_class->prepare = prepare;
operation_class->get_required_for_output = get_required_for_output;
operation_class->name = "gegl:map-absolute";
operation_class->categories = "transform";
operation_class->description = _("sample input with an auxiliary buffer that contain source coordinates");
}
......
......@@ -41,7 +41,7 @@ static void buffer_changed (GeglBuffer *buffer,
static GeglBuffer *ensure_buffer (GeglOperation *operation)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglBuffer *buffer = o->chant_data;
GeglBuffer *buffer = o->chant_data;
if (buffer)
return buffer;
if (!buffer)
......
......@@ -66,7 +66,7 @@ calc_block_colors (gfloat* block_colors,
gint cy0 = CELL_Y(roi->y, ysize);
gint cx1 = CELL_X(roi->x + roi->width - 1, xsize);
gint cy1 = CELL_Y(roi->y + roi->height - 1, ysize);
gint cx;
gint cy;
gfloat weight = 1.0f / (xsize * ysize);
......@@ -78,7 +78,7 @@ calc_block_colors (gfloat* block_colors,
{
gint px = (cx * xsize) - roi->x + xsize;
gint py = (cy * ysize) - roi->y + ysize;
/* calculate the average color for this block */
gint j,i,c;
gfloat col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
......@@ -92,15 +92,15 @@ calc_block_colors (gfloat* block_colors,
}
for (c=0; c<4; ++c)
block_colors[c] = weight * col[c];
block_colors += 4;
block_colors += 4;
}
}
}
static void
pixelise (gfloat* buf,
static void
pixelise (gfloat* buf,
const GeglRectangle* roi,
gint xsize,
gint xsize,
gint ysize)
{
gint cx0 = CELL_X(roi->x, xsize);
......@@ -147,7 +147,7 @@ process (GeglOperation *operation,
src_rect.y -= op_area->top;
src_rect.width += op_area->left + op_area->right;
src_rect.height += op_area->top + op_area->bottom;
buf = g_new0 (gfloat, src_rect.width * src_rect.height * 4);
gegl_buffer_get (input, 1.0, &src_rect, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
......@@ -155,7 +155,7 @@ process (GeglOperation *operation,
pixelise(buf, roi, o->xsize, o->ysize);
gegl_buffer_set (output, roi, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
return TRUE;
......
......@@ -142,7 +142,7 @@ process (GeglOperation *operation,
return TRUE;
}
static GeglRectangle
static GeglRectangle
get_cached_region (GeglOperation *operation,
const GeglRectangle *roi)
{
......
......@@ -128,7 +128,7 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->name = "gegl:rectangle";
operation_class->categories = "input";
operation_class->description =
operation_class->description =
_("A rectangular source of a fixed size with a solid color");
operation_class->attach = attach;
operation_class->prepare = prepare;
......
......@@ -52,7 +52,7 @@ GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_SINK)
#include <stdio.h>
static void
static void
gegl_save_set_saver (GeglOperation *operation)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
......
......@@ -129,7 +129,7 @@ snn_mean (GeglBuffer *src,
for (y=0; y<dst_rect->height; y++)
{
gfloat *center_pix;
center_pix = src_buf + ((radius) + (y+radius)* src_width)*4;
for (x=0; x<dst_rect->width; x++)
......
......@@ -30,7 +30,7 @@ struct _GeglChant
{
GeglOperationSource parent_instance;
gpointer properties;
gchar *cached_path; /* Path we have cached. Detects need for recache. */
};
......@@ -75,7 +75,7 @@ free_buffer (GeglOperation * operation)
g_free (self->cached_path);
self->cached_path = NULL;
}
}
}
/* Loads the RAW pixel data from the specified path in chant parameters into
......@@ -90,14 +90,14 @@ load_buffer (GeglOperation *operation)
ORRawDataRef rawdata;
ORRawFileRef rawfile;
/* If the path has changed since last time, destroy our cache */
if (!self->cached_path || strcmp (self->cached_path, o->path))
{
free_buffer(operation);
}
if (o->chant_data)
if (o->chant_data)
{
return o->chant_data;
}
......@@ -155,7 +155,7 @@ prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "output", babl_format ("Y u16"));
}
static GeglRectangle
get_bounding_box (GeglOperation *operation)
......@@ -212,10 +212,10 @@ static void
finalize (GObject *object)
{
free_buffer (GEGL_OPERATION (object));
G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
}
static void
gegl_chant_class_init (GeglChantClass *klass)
......
......@@ -54,7 +54,7 @@ get_bounding_box (GeglOperation *operation)
static void prepare (GeglOperation *operation)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
gegl_operation_set_format (operation, "output",
gegl_operation_set_format (operation, "output",
babl_format(gdk_pixbuf_get_has_alpha(o->pixbuf)?"R'G'B'A u8":"R'G'B' u8"));
}
......
......@@ -26,9 +26,9 @@
gegl_chant_file_path (path, _("Path"), "/dev/video0", _("Path to v4l device"))
gegl_chant_int (width, _("Width"), 0, G_MAXINT, 320, _("Width for rendered image"))
gegl_chant_int (height, _("Height"), 0, G_MAXINT, 240, _("Height for rendered image"))
gegl_chant_int (frame, _("Frame"), 0, G_MAXINT, 0,
gegl_chant_int (frame, _("Frame"), 0, G_MAXINT, 0,
_("current frame number, can be changed to trigger a reload of the image."))
gegl_chant_int (fps, _("FPS"), 0, G_MAXINT, 0,
gegl_chant_int (fps, _("FPS"), 0, G_MAXINT, 0,
_("autotrigger reload this many times a second."))
#else
......@@ -317,7 +317,7 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->name = "gegl:v4l";
operation_class->categories = "input:video";
operation_class->description =
operation_class->description =
_("Video4Linux input, webcams framegrabbers and similar devices.");
}
......
......@@ -336,7 +336,7 @@ int v4lsetpicture(v4ldevice *vd, int br, int hue, int col, int cont, int white)
}
return 0;
}
/*
* v4lsetpalette - set the palette for the images
*
......
......@@ -62,13 +62,13 @@ static void path_changed (GeglPath *path,
GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
GeglRectangle rect;
gdouble x0, x1, y0, y1;
gegl_path_get_bounds(o->d, &x0, &x1, &y0, &y1);
rect.x = x0;
rect.y = y0;
rect.width = x1 - x0;
rect.height = y1 - y0;
rect.height = y1 - y0;
gegl_operation_invalidate (userdata, roi, TRUE);
};
......@@ -140,22 +140,22 @@ process (GeglOperation *operation,
need_fill=TRUE;
}
if (need_fill)
if (need_fill)
{
GStaticMutex mutex = G_STATIC_MUTEX_INIT;
cairo_t *cr;
cairo_surface_t *surface;
guchar *data;
g_static_mutex_lock (&mutex);
g_static_mutex_lock (&mutex);
data = (void*)gegl_buffer_linear_open (output, result, NULL, babl_format ("B'aG'aR'aA u8"));
surface = cairo_image_surface_create_for_data (data,
CAIRO_FORMAT_ARGB32,
result->width,
result->height,
result->width * 4);
cr = cairo_create (surface);
cairo_translate (cr, -result->x, -result->y);
if (g_str_equal (o->fill_rule, "evenodd"))
......@@ -165,7 +165,7 @@ process (GeglOperation *operation,
cairo_set_source_rgba (cr, r,g,b,a);
cairo_fill (cr);
cairo_destroy (cr);
gegl_buffer_linear_close (output, data);
g_static_mutex_unlock (&mutex);
}
......
......@@ -166,13 +166,13 @@ process (GeglOperation *operation,
need_stroke=TRUE;
}
if (need_stroke)
if (need_stroke)
{
GStaticMutex mutex = G_STATIC_MUTEX_INIT;
cairo_t *cr;
cairo_surface_t *surface;
guchar *data;
g_static_mutex_lock (&mutex);
data = (void*)gegl_buffer_linear_open (output, result, NULL, babl_format ("B'aG'aR'aA u8"));
surface = cairo_image_surface_create_for_data (data,
......@@ -180,25 +180,25 @@ process (GeglOperation *operation,
result->width,
result->height,
result->width * 4);
cr = cairo_create (surface);
cairo_translate (cr, -result->x, -result->y);
cairo_set_line_width (cr, o->width);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
gegl_path_cairo_play (o->d, cr);
cairo_set_source_rgba (cr, r,g,b,a);
cairo_stroke (cr);
cairo_stroke (cr);
cairo_destroy (cr);
gegl_buffer_linear_close (output, data);
g_static_mutex_unlock (&mutex);
}
return TRUE;
}
}
static void foreach_cairo (const GeglPathItem *knot,
gpointer cr)
{
......
#!/usr/bin/env ruby
copyright = '
/* !!!! AUTOGENERATED FILE generated by math.rb !!!!!
/* !!!! AUTOGENERATED FILE generated by math.rb !!!!!
*
* This file is an image processing operation for GEGL
*
......@@ -32,7 +32,7 @@ a = [
# ['threshold', 'c = c>=value?1.0f:0.0f', 0.5],
# ['invert', 'c = 1.0-c']
]
a.each do
|item|
......@@ -130,7 +130,7 @@ process (GeglOperation *op,
out+= 4;
}
}
return TRUE;
}
......
#!/usr/bin/env ruby
copyright = '
/* !!!! AUTOGENERATED FILE generated by other-blend.rb !!!!!
/* !!!! AUTOGENERATED FILE generated by other-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
......@@ -19,7 +19,7 @@ copyright = '
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006,2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
......
#!/usr/bin/env ruby
copyright = '
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
......@@ -19,7 +19,7 @@ copyright = '
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
......
#!/usr/bin/env ruby
copyright = '
/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
*
* This file is an image processing operation for GEGL
*
......@@ -19,7 +19,7 @@ copyright = '
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
......
......@@ -458,7 +458,7 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->name = "gegl:color-reduction";
operation_class->categories = "misc";
operation_class->description =
operation_class->description =
_("Reduces the number of bits per channel (colors and alpha), with optional dithering.");
}
......
......@@ -52,7 +52,7 @@ draw_implementation (Priv *priv, cairo_t *cr)
if (!priv->buf)
return;
surface = cairo_image_surface_create_for_data (priv->buf,
CAIRO_FORMAT_ARGB32,
priv->width, priv->height,
......@@ -171,7 +171,7 @@ process (GeglOperation *operation,
babl_component ("R"),
babl_component ("A"),
NULL);
gegl_buffer_get (source, 1.0, NULL, format,
gegl_buffer_get (source, 1.0, NULL, format,
priv->buf, GEGL_AUTO_ROWSTRIDE);
gtk_widget_queue_draw (priv->drawing_area);
......
#!/usr/bin/env ruby
copyright = '
/* !!!! AUTOGENERATED FILE generated by blend.rb !!!!!
/* !!!! AUTOGENERATED FILE generated by blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
......
......@@ -78,7 +78,7 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->categories = "color";
operation_class->description =
_("Reduces the number of levels in each color component of the image.");
}
#endif
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