Re: [Gimp-developer] gimp-help-2 - TODOs and ideas

2003-12-17 Thread Daniel Egger
Am Mit, den 17.12.2003 schrieb Roman Joost um 21:30:

>   1. Renaming of the current XML files, that the corresponding help ids:
>   app/widgets/gimphelp-ids.h.  This is mostly done by me. I'll check the
>   changes in as soon as possible.

Huh? Probably it's just me being dense...

>   2. Adding XML files for all the other help ids, especially for the
>   plugins. This would help the gimp developers to test the help browser.
>   The content should look like the one in: src/not_yet_written.xml.
>   The structure of each document should look like:
> a) a phrase like: "this document has not been written"
> b) author name
> c) plugin name, additional information, etc
> d) an email adress and a contact person, where a person can send as
> (plain) documentation 

This has caused quite some gripes back in the good ol' times. What about
using xinclude tricks to supply the content of one template document as
the source for yet-to-be written files? This approach is documented in
http://www.sagehill.net/docbookxsl/ however I haven't had the time to
verify that it works with xsltproc yet.

>   3. This item was not discussed on the IRC, but maybe an interesting
>   thing to add: an example how to use a tool|documented item. This
>   should look like eg. "How do you make a rectangular selection". By
>   explaining this example step by step, i think, it'll make the life
>   much easier for the user.

We talked about this earlier and seemed to have agreed that this is a
nice idea. :)

>   We've now only a TODO list on the WIKI. Every gimp-help-2 developer
>   can pick a term and solve it. This reminds me to bugzilla. Well, this
>   implies, that someone feels responsible for his part on gimp-help-2
>   (writing content or something else) and can use bugzilla. How do think
>   other gimp-help-2 members about this? Maybe the project needs a bit
>   more contributors, for making sense...

I don't think it makes sense to have formal assignments of specific
topics as this would take away most of the fun a volunteers project
should make.

-- 
Servus,
   Daniel


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Gimp-developer] [PATCH] Start of a Gradient Scripting Support

2003-12-17 Thread Shlomi Fish

Hi!

This is a patch that adds a gradient segment left/right endpoint
color+opacity set/get routines. Please don't apply it yet, because I'm not
sure if it's philosophy is correct. I'll welcome any comments.

What I decided to do was specify the gradient name and segment index as
parameters to each of the function. However, since the segments in a
gradient are stored as a linked list, it means that accessing segment No.
i is O(i), and on average O(n) where n is the number of segments in the
gradient. This is sub-optimal.

Should we use cursors or the selection instead?

Regards,

Shlomi Fish

--
Shlomi Fish[EMAIL PROTECTED]
Home Page: http://t2.technion.ac.il/~shlomif/

An apple a day will keep a doctor away. Two apples a day will keep two
doctors away.

Falk Fish--- ../gimp-1.3.23/tools/pdbgen/Makefile.am 2003-10-05 15:16:51.0 +0200
+++ gimp/tools/pdbgen/Makefile.am   2003-12-12 21:00:22.0 +0200
@@ -15,6 +15,7 @@
pdb/font_select.pdb \
pdb/fonts.pdb   \
pdb/gimprc.pdb  \
+   pdb/gradient_edit.pdb   \
pdb/gradient_select.pdb \
pdb/gradients.pdb   \
pdb/guides.pdb  \
--- ../gimp-1.3.23/app/pdb/Makefile.am  2003-10-05 15:16:14.0 +0200
+++ gimp/app/pdb/Makefile.am2003-12-12 20:57:07.0 +0200
@@ -20,6 +20,7 @@
font_select_cmds.c  \
fonts_cmds.c\
gimprc_cmds.c   \
+   gradient_edit_cmds.c \
gradient_select_cmds.c  \
gradients_cmds.c\
guides_cmds.c   \
--- ../gimp-1.3.23/tools/pdbgen/groups.pl   2003-09-07 22:57:12.0 +0300
+++ gimp/tools/pdbgen/groups.pl 2003-12-12 20:45:20.0 +0200
@@ -13,6 +13,7 @@
 font_select
 fonts
 gimprc
+gradient_edit
 gradient_select
 gradients
 guides
--- ../gimp-1.3.23/tools/pdbgen/pdb/gradient_edit.pdb   1970-01-01 02:00:00.0 
+0200
+++ gimp/tools/pdbgen/pdb/gradient_edit.pdb 2003-12-17 20:53:44.0 +0200
@@ -0,0 +1,225 @@
+# The GIMP -- an image manipulation program
+# Copyright (C) 1995 Spencer Kimball and Peter Mattis
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+sub pdb_misc {
+$author = $copyright = 'Shlomi Fish';
+$date = '2003';
+}
+
+sub _gen_gradient_search_for_segment_code
+{
+my $action_on_success = shift;
+
+return <<"CODE";
+{
+  if (strlen (name))
+{
+  gradient = (GimpGradient *)
+gimp_container_get_child_by_name (gimp->gradient_factory->container,
+  name);
+}
+  else
+{
+  gradient = gimp_context_get_gradient (gimp_get_current_context (gimp));;
+}
+
+  if (gradient)
+{
+  GimpGradientSegment * seg;
+  int i;
+  seg = gradient->segments;
+  i = 0;
+  while (seg && (i < segment))
+{
+  seg = seg->next;
+  i++;
+}
+  if (seg && (i == segment))
+{
+  /* Success */
+  $action_on_success
+}
+  else
+{
+  success = FALSE;
+}
+}
+  else
+{
+  success = FALSE;
+}
+}
+
+CODE
+}
+
+sub other_side
+{
+my $side = shift;
+
+return ($side eq "left") ? "right" : "left";
+}
+
+sub _gen_gradient_set_side_end_color
+{
+my $side = shift;
+
+my $other_side = other_side($side);
+
+$blurb = "Retrieves the $side endpoint color of the specified gradient and 
segment";
+
+$help = <<"HELP";
+This procedure retrieves the $side endpoint color of the specified segment of
+the specified gradient.
+HELP
+
+&pdb_misc;
+
+@inargs = (
+{
+name => 'name',
+type => 'string',
+desc => 'The name of the gradient to get the color from',
+},
+{
+name => 'segment',
+type => '0 <= int32',
+desc => 'The index of the segment from to which the endpoint belongs',
+},
+{
+name => 'color',
+type => 'color',
+desc => "The color to set",
+},
+{
+name => "opacity",
+type => '0 <= float <= 100.0',
+desc => "The opacity to set for the 

[Gimp-developer] gimp-help-2 - TODOs and ideas

2003-12-17 Thread Roman Joost
After a quick discussion with mitch and Sven in the IRC, i've some new
ideas and TODOs for the gimp-help-2 to submit. I added these terms to
the WIKI. Sorry for beeing a bit late, but the week is a bit stressful.

  1. Renaming of the current XML files, that the corresponding help ids:
  app/widgets/gimphelp-ids.h.  This is mostly done by me. I'll check the
  changes in as soon as possible.

  2. Adding XML files for all the other help ids, especially for the
  plugins. This would help the gimp developers to test the help browser.
  The content should look like the one in: src/not_yet_written.xml.
  The structure of each document should look like:
a) a phrase like: "this document has not been written"
b) author name
c) plugin name, additional information, etc
d) an email adress and a contact person, where a person can send as
(plain) documentation 

  3. This item was not discussed on the IRC, but maybe an interesting
  thing to add: an example how to use a tool|documented item. This
  should look like eg. "How do you make a rectangular selection". By
  explaining this example step by step, i think, it'll make the life
  much easier for the user.


Additionally, i've an idea for making live a bit easier:

  We've now only a TODO list on the WIKI. Every gimp-help-2 developer
  can pick a term and solve it. This reminds me to bugzilla. Well, this
  implies, that someone feels responsible for his part on gimp-help-2
  (writing content or something else) and can use bugzilla. How do think
  other gimp-help-2 members about this? Maybe the project needs a bit
  more contributors, for making sense...

I updated the WIKI pages correspondingly to this mail.

Greetings,
-- 
Roman Joost
www: http://www.romanofski.de
email: [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: [Gimp-developer] Updating Script-Fu scripts for GIMP 1.3+

2003-12-17 Thread Kevin Cozens
At 06:54 AM 12/17/2003 +0100, Marc Lehmann wrote:
> > Script-Fu scripts? In the days of GIMP 1.1.x  there used to be a
> > script which aided in the updating of Script-Fu scripts from the 1.0
> > API to the 1.1/1.2 API but I don't see one in the 1.3 CVS copy of GIMP.
If you talk about scm2scm, it's part of the gimp-perl distro and
relatively straightfoward (no dependencies, it builds a tree of the
script, runs some filtering operations and prints out the script again).
Thank you Marc. It has been so long since I had used the script, or even 
thought about it, that I couldn't remember the name. I will get a copy of 
gimp-perl from the CVS repository and take a look at the script. I remember 
in the 1.0 to 1.1.x days I made changes to the scm2scm script to handle a 
few things it either wasn't handling or wasn't handling well. It still had 
problems such as dealing with changes to the argument list to certain API 
calls but it still made it easier and faster to deal with the cases where 
only the name had changed.

BTW, the bug fix regarding the positioning of text works. Most of the 
Script-Fu logo scripts I was updating now work properly in the CVS version 
of the GIMP as of last night. I have added these updated scripts to my web 
site (in the software section). I still have about 8 scripts (not all of 
them Logo scripts) which still need work.

Cheers!

Kevin.  (http://www.interlog.com/~kcozens/)

Owner of Elecraft K2 #2172|"What are we going to do today, Borg?"
E-mail:kcozens at interlog dot com|"Same thing we always do, Pinkutus:
Packet:[EMAIL PROTECTED]|  Try to assimilate the world!"
#include|  -Pinkutus & the Borg
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Handling of transparent pixels

2003-12-17 Thread Joao S. O. Bueno
On Tuesday 16 December 2003 21:44, Patrick McFarland wrote:

> > I tried PS to see how it handles Alpha. I became quite
> > frustrated. Once I deleted a part of the image and saved and
> > reloaded it, I found *no* way of increasing the opacity of
> > partially transparent pixels, not to mention totally transparent
> > ones, except by painting. All adjustment tools had RGB but no A.
> > Maybe it's just that I'm missing something because I'm not
> > experienced with it but now I think that PS is not my kind of
> > program.
>
> GIMP is exactly the same way. I have no way of doing alpha only
> operations, except when hacking up the transparency mask. My
> suggestion above would fix this. Colors are RGB, and Alpha is
> altered through the transparency mask.

Curves Tool, 
It is the alpha manipulation per excellence, IMO.

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer