gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-user | today 10:48 AM
    Suppressing the "press any character to close this window" message in Script-Fu
  2. gimp-developer | today 10:45 AM
    Help with new default resources in 2.8
  3. gimp-docs | today 10:34 AM
    Where does the HTML documentation
  4. gimp-developer | today 09:34 AM
    html layers
  5. gimp-developer | today 08:50 AM
    Please fix Color and/or Value transfer mode

External news

Poll

Would you like to see or even participate in GFX contests hosted by gimpusers.com?

Yes, but prices for winners are important!

Yes, GFX contests are a good idea! It brings community together even if there are no prices available

No, contests are not important

Maybe, it is however not a tragedy if there are no contests. I don't care much.

See results

Stats

gimpusers.com RSS feed

GIMP Forums » For GEGL developers

Patch for rectangle func and GeglRectangle initialization in tests/buffer/buffer-test.c

Jump to message:

  1. Patch for rectangle... — Albert Chin, 29 Nov 2009 05:31 PM

As a registered user, you can subscribe forum threads in order to get notified when replies are posted. Just log in at the right top of the page if you already have an account, otherwise you can register for free.

Permalink:20091129163104.GD5638@localhost.local...
Date:29 Nov 2009 05:31 PM
From:Albert Chin
Subject:Patch for rectangle func and GeglRectangle initialization in tests/buffer/buffer-test.c
1. The void rectangle function in tests/buffer/buffer-test.c should be
static void to match the prototype.
2. You cannot initialize rect when you declare it in rectangle() unless
you assume a C99 compiler.

Patch for both issues attached.
--
albert chin (china@thewrittenword.com)

Index: tests/buffer/buffer-test.c
===================================================================
--- tests/buffer/buffer-test.c.orig 2009-11-29 16:20:15.964770878 +0000
+++ tests/buffer/buffer-test.c 2009-11-29 16:28:32.408518645 +0000
@@ -270,15 +270,20 @@
}
}

-void rectangle (GeglBuffer *buffer,
- gint x,
- gint y,
- gint width,
- gint height,
- gfloat value)
+static void rectangle (GeglBuffer *buffer,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gfloat value)
{
GeglBuffer *sub_buf;
- GeglRectangle rect={x,y,width,height};
+ GeglRectangle rect;
+
+ rect.x = x;
+ rect.y = y;
+ rect.width = width;
+ rect.height = height;

sub_buf = gegl_buffer_create_sub_buffer (buffer, &rect);
fill (sub_buf, value);

_______________________________________________
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer
↑Back to thread overview

Adobe® Photoshop® is a registered trademark of Adobe Systems, Inc. Linux is a trademark of Linus Torvalds. Ubuntu and Canonical are registered trademarks of Canonical Ltd. | Clock times are shown as CET / CEST | Imprint / Privacy policy | powered by bitfire it services | sponsored by Hirners Hotel Guide