Commit dde74f97 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/Makefile.am app/gimpchannel.[ch] new files moved here by Yosh.

2001-02-01  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/gimpchannel.[ch]
	* app/gimplayer.[ch]: new files moved here by Yosh.

	* app/channel.[ch]
	* app/layer.[ch]: removed.

	* app/gdisplay.c: cleanup stuff.

	* app/[lotsa files].c
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/layer.pdb: changed includes accordingly.
parent edc9ba7b
2001-02-01 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimpchannel.[ch]
* app/gimplayer.[ch]: new files moved here by Yosh.
* app/channel.[ch]
* app/layer.[ch]: removed.
* app/gdisplay.c: cleanup stuff.
* app/[lotsa files].c
* tools/pdbgen/Makefile.am
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/layer.pdb: changed includes accordingly.
2001-01-31 Seth Burgess <sjburges@gimp.org>
* plug-ins/perl/po/POTFILES.in : removed bilb/lib/Gimp.pm from list,
......
......@@ -34,8 +34,6 @@ gimp_SOURCES = \
brush_scale.h \
brush_select.c \
brush_select.h \
channel.c \
channel.h \
channels_dialog.c \
channels_dialog.h \
channel_ops.c \
......@@ -110,6 +108,8 @@ gimp_SOURCES = \
gimpbrushlist.h \
gimpbrushpipe.c \
gimpbrushpipe.h \
gimpchannel.c \
gimpchannel.h \
gimpcontext.c \
gimpcontext.h \
gimpcontextpreview.c \
......@@ -126,6 +126,8 @@ gimp_SOURCES = \
gimphistogram.h \
gimpimage.c \
gimpimage.h \
gimplayer.c \
gimplayer.h \
gimplayermask.c \
gimplayermask.h \
gimplist.c \
......@@ -177,8 +179,6 @@ gimp_SOURCES = \
interface.h \
invert.c \
invert.h \
layer.c \
layer.h \
layer_select.c \
layer_select.h \
layers_dialog.c \
......
......@@ -51,6 +51,7 @@
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimprc.h"
#include "gimpui.h"
#include "global_edit.h"
......@@ -58,7 +59,6 @@
#include "image_render.h"
#include "info_dialog.h"
#include "info_window.h"
#include "layer.h"
#include "nav_window.h"
#include "invert.h"
#include "lc_dialog.h"
......
......@@ -29,14 +29,14 @@
#include "apptypes.h"
#include "channel.h"
#include "color_panel.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpimage.h"
#include "global_edit.h"
#include "qmask.h"
#include "undo.h"
......
......@@ -29,14 +29,14 @@
#include "apptypes.h"
#include "channel.h"
#include "color_panel.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpimage.h"
#include "global_edit.h"
#include "qmask.h"
#include "undo.h"
......
......@@ -31,7 +31,6 @@
#include "apptypes.h"
#include "channel.h"
#include "gimpdrawable.h"
#include "gimphistogram.h"
#include "gimpimage.h"
......
This diff is collapsed.
/* 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.
*/
#ifndef __GIMP_CHANNEL_H__
#define __GIMP_CHANNEL_H__
#include "gimpdrawable.h"
/* Half way point where a region is no longer visible in a selection */
#define HALF_WAY 127
#define GIMP_TYPE_CHANNEL (gimp_channel_get_type ())
#define GIMP_CHANNEL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHANNEL, GimpChannel))
#define GIMP_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHANNEL, GimpChannelClass))
#define GIMP_IS_CHANNEL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHANNEL))
#define GIMP_IS_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHANNEL))
typedef struct _GimpChannelClass GimpChannelClass;
struct _GimpChannel
{
GimpDrawable parent_instance;
GimpRGB color; /* Also stored the opacity */
gboolean show_masked; /* Show masked areas--as */
/* opposed to selected areas */
/* Selection mask variables */
gboolean boundary_known; /* is the current boundary valid */
BoundSeg *segs_in; /* outline of selected region */
BoundSeg *segs_out; /* outline of selected region */
gint num_segs_in; /* number of lines in boundary */
gint num_segs_out; /* number of lines in boundary */
gboolean empty; /* is the region empty? */
gboolean bounds_known; /* recalculate the bounds? */
gint x1, y1; /* coordinates for bounding box */
gint x2, y2; /* lower right hand coordinate */
};
struct _GimpChannelClass
{
GimpDrawableClass parent_class;
};
/* Special undo types */
typedef struct _ChannelUndo ChannelUndo;
typedef struct _MaskUndo MaskUndo;
struct _ChannelUndo
{
GimpChannel *channel; /* the actual channel */
gint prev_position; /* former position in list */
GimpChannel *prev_channel; /* previous active channel */
};
struct _MaskUndo
{
TileManager *tiles; /* the actual mask */
gint x, y; /* offsets */
};
/* function declarations */
GtkType gimp_channel_get_type (void);
GimpChannel * gimp_channel_new (GimpImage *gimage,
gint width,
gint height,
const gchar *name,
const GimpRGB *color);
GimpChannel * gimp_channel_copy (const GimpChannel *channel);
gint gimp_channel_get_opacity (const GimpChannel *channel);
void gimp_channel_set_opacity (GimpChannel *channel,
gint opacity);
const GimpRGB * gimp_channel_get_color (const GimpChannel *channel);
void gimp_channel_set_color (GimpChannel *channel,
const GimpRGB *color);
void gimp_channel_scale (GimpChannel *channel,
gint new_width,
gint new_height);
void gimp_channel_resize (GimpChannel *channel,
gint new_width,
gint new_height,
gint offx,
gint offy);
gboolean gimp_channel_toggle_visibility (GimpChannel *channel);
/* selection mask functions */
GimpChannel * gimp_channel_new_mask (GimpImage *gimage,
gint width,
gint height);
gboolean gimp_channel_boundary (GimpChannel *mask,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out,
gint x1,
gint y1,
gint x2,
gint y2);
gboolean gimp_channel_bounds (GimpChannel *mask,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
gint gimp_channel_value (GimpChannel *mask,
gint x,
gint y);
gboolean gimp_channel_is_empty (GimpChannel *mask);
void gimp_channel_add_segment (GimpChannel *mask,
gint x,
gint y,
gint width,
gint value);
void gimp_channel_sub_segment (GimpChannel *mask,
gint x,
gint y,
gint width,
gint value);
void gimp_channel_combine_rect (GimpChannel *mask,
ChannelOps op,
gint x,
gint y,
gint w,
gint h);
void gimp_channel_combine_ellipse (GimpChannel *mask,
ChannelOps op,
gint x,
gint y,
gint w,
gint h,
gboolean antialias);
void gimp_channel_combine_mask (GimpChannel *mask,
GimpChannel *add_on,
ChannelOps op,
gint off_x,
gint off_y);
void gimp_channel_feather (GimpChannel *input,
GimpChannel *output,
gdouble radius_x,
gdouble radius_y,
ChannelOps op,
gint off_x,
gint off_y);
void gimp_channel_push_undo (GimpChannel *mask);
void gimp_channel_clear (GimpChannel *mask);
void gimp_channel_invert (GimpChannel *mask);
void gimp_channel_sharpen (GimpChannel *mask);
void gimp_channel_all (GimpChannel *mask);
void gimp_channel_border (GimpChannel *mask,
gint radius_x,
gint radius_y);
void gimp_channel_grow (GimpChannel *mask,
gint radius_x,
gint radius_y);
void gimp_channel_shrink (GimpChannel *mask,
gint radius_x,
gint radius_y,
gboolean edge_lock);
void gimp_channel_translate (GimpChannel *mask,
gint off_x,
gint off_y);
void gimp_channel_load (GimpChannel *mask,
GimpChannel *channel);
void gimp_channel_layer_alpha (GimpChannel *mask,
GimpLayer *layer);
void gimp_channel_layer_mask (GimpChannel *mask,
GimpLayer *layer);
void gimp_channel_invalidate_bounds (GimpChannel *channel);
#endif /* __GIMP_CHANNEL_H__ */
......@@ -29,15 +29,15 @@
#include "apptypes.h"
#include "apptypes.h"
#include "channel.h"
#include "channel_ops.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimpcontext.h"
#include "gimage.h"
#include "layer.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimplayer.h"
#include "paint_funcs.h"
#include "parasitelist.h"
#include "path.h"
......
......@@ -28,13 +28,13 @@
#include "apptypes.h"
#include "appenv.h"
#include "channel.h"
#include "channels_dialog.h"
#include "color_panel.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpchannel.h"
#include "gimpdnd.h"
#include "gimpdrawablepreview.h"
#include "gimppreviewcache.h"
......
......@@ -51,6 +51,7 @@
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimprc.h"
#include "gimpui.h"
#include "global_edit.h"
......@@ -58,7 +59,6 @@
#include "image_render.h"
#include "info_dialog.h"
#include "info_window.h"
#include "layer.h"
#include "nav_window.h"
#include "invert.h"
#include "lc_dialog.h"
......
......@@ -104,8 +104,8 @@
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimppalette.h"
#include "layer.h"
#include "palette.h"
#include "palette_select.h"
#include "pixel_region.h"
......
......@@ -32,10 +32,10 @@
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimplayer.h"
#include "gimplayermask.h"
#include "global_edit.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "tile_manager.h"
......
......@@ -30,13 +30,13 @@
#include "appenv.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimpchannel.h"
#include "gimplayer.h"
#include "gimppreviewcache.h"
#include "gimplut.h"
#include "layer.h"
#include "paint_funcs.h"
#include "parasitelist.h"
#include "pixel_processor.h"
......@@ -1595,25 +1595,25 @@ gimp_channel_layer_mask (GimpChannel *mask,
gimp_channel_push_undo (mask);
/* clear the mask */
pixel_region_init (&destPR, GIMP_DRAWABLE(mask)->tiles,
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
GIMP_DRAWABLE(mask)->width, GIMP_DRAWABLE(mask)->height,
GIMP_DRAWABLE (mask)->width, GIMP_DRAWABLE (mask)->height,
TRUE);
color_region (&destPR, &empty);
x1 = CLAMP (GIMP_DRAWABLE(layer)->offset_x, 0, GIMP_DRAWABLE(mask)->width);
y1 = CLAMP (GIMP_DRAWABLE(layer)->offset_y, 0, GIMP_DRAWABLE(mask)->height);
x2 = CLAMP (GIMP_DRAWABLE(layer)->offset_x + GIMP_DRAWABLE(layer)->width,
0, GIMP_DRAWABLE(mask)->width);
y2 = CLAMP (GIMP_DRAWABLE(layer)->offset_y + GIMP_DRAWABLE(layer)->height,
0, GIMP_DRAWABLE(mask)->height);
x1 = CLAMP (GIMP_DRAWABLE (layer)->offset_x, 0, GIMP_DRAWABLE (mask)->width);
y1 = CLAMP (GIMP_DRAWABLE (layer)->offset_y, 0, GIMP_DRAWABLE (mask)->height);
x2 = CLAMP (GIMP_DRAWABLE (layer)->offset_x + GIMP_DRAWABLE (layer)->width,
0, GIMP_DRAWABLE (mask)->width);
y2 = CLAMP (GIMP_DRAWABLE (layer)->offset_y + GIMP_DRAWABLE (layer)->height,
0, GIMP_DRAWABLE (mask)->height);
pixel_region_init (&srcPR, GIMP_DRAWABLE(layer->mask)->tiles,
(x1 - GIMP_DRAWABLE(layer)->offset_x),
(y1 - GIMP_DRAWABLE(layer)->offset_y),
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer->mask)->tiles,
(x1 - GIMP_DRAWABLE (layer)->offset_x),
(y1 - GIMP_DRAWABLE (layer)->offset_y),
(x2 - x1), (y2 - y1),
FALSE);
pixel_region_init (&destPR, GIMP_DRAWABLE(mask)->tiles,
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
x1, y1,
(x2 - x1), (y2 - y1),
TRUE);
......
......@@ -30,13 +30,13 @@
#include "appenv.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimpchannel.h"
#include "gimplayer.h"
#include "gimppreviewcache.h"
#include "gimplut.h"
#include "layer.h"
#include "paint_funcs.h"
#include "parasitelist.h"
#include "pixel_processor.h"
......@@ -1595,25 +1595,25 @@ gimp_channel_layer_mask (GimpChannel *mask,
gimp_channel_push_undo (mask);
/* clear the mask */
pixel_region_init (&destPR, GIMP_DRAWABLE(mask)->tiles,
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
GIMP_DRAWABLE(mask)->width, GIMP_DRAWABLE(mask)->height,
GIMP_DRAWABLE (mask)->width, GIMP_DRAWABLE (mask)->height,
TRUE);
color_region (&destPR, &empty);
x1 = CLAMP (GIMP_DRAWABLE(layer)->offset_x, 0, GIMP_DRAWABLE(mask)->width);
y1 = CLAMP (GIMP_DRAWABLE(layer)->offset_y, 0, GIMP_DRAWABLE(mask)->height);
x2 = CLAMP (GIMP_DRAWABLE(layer)->offset_x + GIMP_DRAWABLE(layer)->width,
0, GIMP_DRAWABLE(mask)->width);
y2 = CLAMP (GIMP_DRAWABLE(layer)->offset_y + GIMP_DRAWABLE(layer)->height,
0, GIMP_DRAWABLE(mask)->height);
x1 = CLAMP (GIMP_DRAWABLE (layer)->offset_x, 0, GIMP_DRAWABLE (mask)->width);
y1 = CLAMP (GIMP_DRAWABLE (layer)->offset_y, 0, GIMP_DRAWABLE (mask)->height);
x2 = CLAMP (GIMP_DRAWABLE (layer)->offset_x + GIMP_DRAWABLE (layer)->width,
0, GIMP_DRAWABLE (mask)->width);
y2 = CLAMP (GIMP_DRAWABLE (layer)->offset_y + GIMP_DRAWABLE (layer)->height,
0, GIMP_DRAWABLE (mask)->height);
pixel_region_init (&srcPR, GIMP_DRAWABLE(layer->mask)->tiles,
(x1 - GIMP_DRAWABLE(layer)->offset_x),
(y1 - GIMP_DRAWABLE(layer)->offset_y),
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer->mask)->tiles,
(x1 - GIMP_DRAWABLE (layer)->offset_x),
(y1 - GIMP_DRAWABLE (layer)->offset_y),
(x2 - x1), (y2 - y1),
FALSE);
pixel_region_init (&destPR, GIMP_DRAWABLE(mask)->tiles,
pixel_region_init (&destPR, GIMP_DRAWABLE (mask)->tiles,
x1, y1,
(x2 - x1), (y2 - y1),
TRUE);
......
......@@ -29,15 +29,15 @@
#include "apptypes.h"
#include "apptypes.h"
#include "channel.h"
#include "channel_ops.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimpcontext.h"
#include "gimage.h"
#include "layer.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimplayer.h"
#include "paint_funcs.h"
#include "parasitelist.h"
#include "path.h"
......
......@@ -29,12 +29,12 @@
#include "apptypes.h"
#include "channel.h"
#include "gimpdrawable.h"
#include "layer.h"
#include "gimppreviewcache.h"
#include "gimage_mask.h"
#include "gimpchannel.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimppreviewcache.h"
#include "gimpparasite.h"
#include "paint_funcs.h"
#include "parasitelist.h"
......
......@@ -32,10 +32,10 @@
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimplayer.h"
#include "gimplayermask.h"
#include "global_edit.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "tile_manager.h"
......
......@@ -104,8 +104,8 @@
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimppalette.h"
#include "layer.h"
#include "palette.h"
#include "palette_select.h"
#include "pixel_region.h"
......
......@@ -29,15 +29,15 @@
#include "apptypes.h"
#include "apptypes.h"
#include "channel.h"
#include "channel_ops.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimpcontext.h"
#include "gimage.h"
#include "layer.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimplayer.h"
#include "paint_funcs.h"
#include "parasitelist.h"
#include "path.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment