New plugin to slice an image up along its Guides.

* plug-ins/guillotine/Makefile.am configure.in
	plug-ins/guillotine/guillotine.c plug-ins/Makefile.am:
	New plugin to slice an image up along its Guides.

	* app/gimage_cmds.c: Fixes.
This commit is contained in:
Adam D. Moss 1998-09-01 22:12:45 +00:00
parent 976f803c44
commit 09e6e30a77
4 changed files with 30 additions and 15 deletions

View File

@ -1,3 +1,11 @@
Tue Sep 1 23:00:42 BST 1998 Adam D. Moss <adam@gimp.org>
* plug-ins/guillotine/Makefile.am configure.in
plug-ins/guillotine/guillotine.c plug-ins/Makefile.am:
New plugin to slice an image up along its Guides.
* app/gimage_cmds.c: Fixes.
Tue Sep 1 19:19:57 BST 1998 Adam D. Moss <adam@gimp.org>
* app/gimage_cmds.c app/gimage_cmds.h app/gimpimage.c

View File

@ -3851,7 +3851,7 @@ gimp_image_findnext_guide_invoker (Argument *args)
int success = TRUE;
int int_value;
int guide_id;
int rtn_guide_id;
int rtn_guide_id = 0;
GImage *gimage;
GList *guides;
Argument *return_args;
@ -3884,7 +3884,7 @@ gimp_image_findnext_guide_invoker (Argument *args)
((Guide*)guides->data)->position < 0)
guides = g_list_next(guides);
if (guides)
if (guides) /* didn't just come to end of list */
rtn_guide_id = ((Guide*)guides->data)->guide_ID;
}
else
@ -3896,6 +3896,8 @@ gimp_image_findnext_guide_invoker (Argument *args)
if ((((Guide*)guides->data)->guide_ID == guide_id) &&
(((Guide*)guides->data)->position>=0) )
{
GList* tmplist;
/*printf("Gotcha at %p: %d, %d, %d\n",
((Guide*)guides->data),
((Guide*)guides->data)->position,
@ -3904,20 +3906,23 @@ gimp_image_findnext_guide_invoker (Argument *args)
);*/
success = TRUE;
if (g_list_next(guides) == NULL)
{
rtn_guide_id = 0;
}
else
{
GList* tmplist;
tmplist = g_list_next(guides);
rtn_guide_id = ((Guide*)tmplist->data)->guide_ID;
goto got_it;
tmplist = g_list_next(guides);
rtn_guide_id = 0;
while ((tmplist != NULL) &&
(((Guide*)tmplist->data)->position < 0) )
{
tmplist = g_list_next(tmplist);
}
if (tmplist != NULL)
rtn_guide_id = ((Guide*)tmplist->data)->guide_ID;
goto got_it;
}
guides = g_list_next(guides);
}
}
@ -3993,7 +3998,7 @@ gimp_image_get_guide_orientation_invoker (Argument *args)
int success = TRUE;
int int_value;
int guide_id;
int rtn_orientation;
int rtn_orientation = 0;
GImage *gimage;
GList *guides;
Argument *return_args;
@ -4110,7 +4115,7 @@ gimp_image_get_guide_position_invoker (Argument *args)
int success = TRUE;
int int_value;
int guide_id;
int rtn_position;
int rtn_position = -1;
GImage *gimage;
GList *guides;
Argument *return_args;

View File

@ -540,6 +540,7 @@ plug-ins/gqbist/Makefile
plug-ins/gradmap/Makefile
plug-ins/grid/Makefile
plug-ins/gtm/Makefile
plug-ins/guillotine/Makefile
plug-ins/gz/Makefile
plug-ins/header/Makefile
plug-ins/hot/Makefile

View File

@ -67,6 +67,7 @@ SUBDIRS = \
gradmap \
grid \
gtm \
guillotine \
gz \
header \
hot \