mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
This commit is contained in:
parent
825fdecff0
commit
c5a8b43846
113 changed files with 2132 additions and 1235 deletions
|
@ -25,7 +25,7 @@
|
|||
#include "gimage_mask.h"
|
||||
#include "paint_funcs.h"
|
||||
#include "palette.h"
|
||||
#include "parasite.h"
|
||||
#include "libgimp/parasite.h"
|
||||
#include "undo.h"
|
||||
#include "gimpsignal.h"
|
||||
|
||||
|
@ -137,6 +137,7 @@ static void gimp_image_init (GimpImage *gimage)
|
|||
gimage->dirty = 1;
|
||||
gimage->undo_on = TRUE;
|
||||
gimage->construct_flag = -1;
|
||||
gimage->tattoo_state = 0;
|
||||
gimage->projection = NULL;
|
||||
gimage->guides = NULL;
|
||||
gimage->layers = NULL;
|
||||
|
@ -152,6 +153,7 @@ static void gimp_image_init (GimpImage *gimage)
|
|||
gimage->comp_preview_valid[2] = FALSE;
|
||||
gimage->comp_preview = NULL;
|
||||
gimage->parasites = NULL;
|
||||
gimp_matrix_identity(gimage->transform);
|
||||
gimage->resolution = 72.0; /* maybe should be rc-supplied default? */
|
||||
}
|
||||
|
||||
|
@ -860,10 +862,9 @@ gimp_image_delete_guide (GimpImage *gimage,
|
|||
|
||||
|
||||
Parasite *
|
||||
gimp_image_find_parasite (const GimpImage *gimage,
|
||||
const char *creator, const char *type)
|
||||
gimp_image_find_parasite (const GimpImage *gimage, const char *name)
|
||||
{
|
||||
return parasite_find_in_gslist(gimage->parasites, creator, type);
|
||||
return parasite_find_in_gslist(gimage->parasites, name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -873,12 +874,21 @@ gimp_image_attach_parasite (GimpImage *gimage, const Parasite *parasite)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_detach_parasite (GimpImage *gimage, Parasite *parasite)
|
||||
gimp_image_detach_parasite (GimpImage *gimage, const char *parasite)
|
||||
{
|
||||
gimage->parasites = g_slist_remove (gimage->parasites, parasite);
|
||||
parasite_free(parasite);
|
||||
Parasite *p;
|
||||
if ((p = parasite_find_in_gslist(gimage->parasites, parasite)))
|
||||
gimage->parasites = g_slist_remove (gimage->parasites, p);
|
||||
parasite_free(p);
|
||||
}
|
||||
|
||||
guint32
|
||||
gimp_image_get_new_tattoo(GimpImage *image)
|
||||
{
|
||||
return (++image->tattoo_state);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************/
|
||||
/* Projection functions */
|
||||
/************************************************************/
|
||||
|
@ -1395,6 +1405,41 @@ gimp_image_get_active_channel (GimpImage *gimage)
|
|||
}
|
||||
|
||||
|
||||
Layer *
|
||||
gimp_image_get_layer_by_tattoo (GimpImage *gimage, guint32 tattoo)
|
||||
{
|
||||
Layer *layer;
|
||||
GSList *layers = gimage->layers;
|
||||
|
||||
while (layers)
|
||||
{
|
||||
layer = (Layer *) layers->data;
|
||||
if (layer_get_tattoo(layer) == tattoo)
|
||||
return layer;
|
||||
layers = g_slist_next (layers);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Channel *
|
||||
gimp_image_get_channel_by_tattoo (GimpImage *gimage, guint32 tattoo)
|
||||
{
|
||||
Channel *channel;
|
||||
GSList *channels = gimage->channels;
|
||||
|
||||
while (channels)
|
||||
{
|
||||
channel = (Channel *) channels->data;
|
||||
if (channel_get_tattoo(channel) == tattoo)
|
||||
return channel;
|
||||
channels = g_slist_next (channels);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
gimp_image_get_component_active (GimpImage *gimage, ChannelType type)
|
||||
{
|
||||
|
@ -2119,8 +2164,8 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
|
|||
gimage->floating_sel = float_layer;
|
||||
|
||||
/* let the layer know about the gimage */
|
||||
GIMP_DRAWABLE(float_layer)->gimage = gimage;
|
||||
|
||||
gimp_drawable_set_gimage(GIMP_DRAWABLE(float_layer), gimage);
|
||||
|
||||
/* add the layer to the list at the specified position */
|
||||
if (position == -1)
|
||||
position = gimp_image_get_layer_index (gimage, gimage->active_layer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue