RSS/Atom feed Twitter
Site is read-only, email is disabled

help writing plugin

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

help writing plugin Dream Artist Aspiring 12 Sep 17:23
  help writing plugin Simon Budig 12 Sep 18:33
  help writing plugin DreamArtist 13 Sep 16:30
Dream Artist Aspiring
2006-09-12 17:23:20 UTC (over 17 years ago)

help writing plugin

Hi all, I am new to gimp and trying to learn plugins. I wanted to start by drawing a circle. So basically,
for(t=0; t < 360; t++)
{
x(t) = cos(t);
y(t) = sin(t);
col(t) = black;
paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t).
}

So, how do I proceed in general. Right now, I created a new image, created a new layer and added to image, filled the background color. After this I know how to compute x(t), y(t) and col(t). I dont know how to do the last step: " paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t)". Can any one suggest how to do the last step. Thanks very much in advance....

Simon Budig
2006-09-12 18:33:11 UTC (over 17 years ago)

help writing plugin

Dream Artist Aspiring (raajahamsa@gmail.com) wrote:

Hi all, I am new to gimp and trying to learn plugins. I wanted to start by drawing a circle. So basically,
for(t=0; t < 360; t++)
{
x(t) = cos(t);
y(t) = sin(t);
col(t) = black;
paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t).
}

So, how do I proceed in general. Right now, I created a new image, created a new layer and added to image, filled the background color. After this I know how to compute x(t), y(t) and col(t). I dont know how to do the last step: " paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t)". Can any one suggest how to do the last step. Thanks very much in advance....

I suggest to read my tutorial on that topic here: http://www.home.unix-ag.org/simon/gimp/guadec2002/gimp-plugin/html/ especially chapter 5 will be of interest to you. The tutorial is a bit older so it might need slight adjustments in some parts (especially it does not yet mention the PixelFetcher stuff) but in general it is still worth a read.

There are lots of plugins available as source code in the gimp source, reading the simpler plugins can be quite enlightening.

Please look at these ressources, if they don't help you I'll be happy to answer further questions.

Bye, Simon

DreamArtist
2006-09-13 16:30:59 UTC (over 17 years ago)

help writing plugin

Hi Simon, thanks again for the help. I will read through these and try to write my plugin.

_____

From: Dream Artist Aspiring [mailto:raajahamsa@gmail.com] Sent: Tuesday, September 12, 2006 8:53 PM To: gimp-developer@lists.XCF.Berkeley.EDU Subject: help writing plugin

Hi all, I am new to gimp and trying to learn plugins. I wanted to start by drawing a circle. So basically,
for(t=0; t < 360; t++)
{
x(t) = cos(t);
y(t) = sin(t);
col(t) = black;
paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t).
}

So, how do I proceed in general. Right now, I created a new image, created a new layer and added to image, filled the background color. After this I know how to compute x(t), y(t) and col(t). I dont know how to do the last step: " paint col(t) at x(t), y(t) or better; draw a black line from x(t-1),y(t-1) to x(t),y(t)". Can any one suggest how to do the last step. Thanks very much in advance....