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

ForumsFor GEGL developers (read-only) ► Patch for rectangle func and GeglRectangle initialization in tests/buffer/buffer-test.c

Sent: 2009-11-29 17:31:05 UTC (about 2 years ago)

From: Albert Chin

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

Welcome!


Lost password?

Not a member? Sign up!

Random tutorials | Latest tutorials

  1. Hot Wallpaper with Flames Hot Wallpaper with Flames 52
  2. Creating an abstract chaos explosion Creating an abstract chaos explosion 10
  3. Create a simple Grunge-Stamp! Create a simple Grunge-Stamp! 7
  4. Ashes to ashes, dust to dust. Dissolve text into particles Ashes to ashes, dust to dust. Dissolve text into particles 3

Latest comments

2.6.12 crashes on startup in windows xp. 2.6.11 works fine. (2 days ago in Last stable 2.6 release: 2.6.12 has arrived)

Thank you! You really helped! The tutorial went great for me! Tha... (5 days ago in [AVATAR] Become a real Na'Vi using GIMP!)

maybe you still selected a channel or so? explicitly click a layer ... (5 days ago in Create cool rifts with translucent lights!)

Poll

Is GIMP an adequate application for you to create printed graphics like flyers, advertisments etc?

Latest forum activities

Your Ad Here

facts & numbers

gimpusers.com RSS feed

48 identi.ca followers
749 Twitter followers

powered by bitfire it services