mirror of https://github.com/GNOME/gimp.git
Got all the .h files too this time...
This commit is contained in:
parent
eb3dda1484
commit
24cb62a81c
|
@ -1,56 +0,0 @@
|
|||
#include <libgimp/gimp.h>
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define MAXCOLORS 256
|
||||
#define Image gint32
|
||||
|
||||
#define BitSet(byte, bit) (((byte) & (bit)) == (bit))
|
||||
|
||||
#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0)
|
||||
#define WriteOK(file,buffer,len) (fwrite(buffer, len, 1, file) != 0)
|
||||
|
||||
extern gint32 ReadBMP (char *);
|
||||
extern gint WriteBMP (char *,gint32,gint32);
|
||||
extern gint ReadColorMap(FILE *, unsigned char[256][3], int, int, int *);
|
||||
extern Image ReadImage(FILE *, int, int, unsigned char[256][3], int, int, int, int, int);
|
||||
extern void WriteColorMap(FILE *, int *, int *, int *, int);
|
||||
extern void WriteImage(FILE *,char *,int,int,int,int,int,int);
|
||||
|
||||
extern int interactive_bmp;
|
||||
extern char *prog_name;
|
||||
extern char *filename;
|
||||
extern FILE *errorfile;
|
||||
|
||||
static struct
|
||||
{
|
||||
unsigned long bfSize; /* 02 */
|
||||
unsigned long reserverd; /* 06 */
|
||||
unsigned long bfOffs; /* 0A */
|
||||
unsigned long biSize; /* 0E */
|
||||
}Bitmap_File_Head;
|
||||
|
||||
static struct
|
||||
{
|
||||
unsigned long biWidth; /* 12 */
|
||||
unsigned long biHeight; /* 16 */
|
||||
unsigned long biPlanes_biBitCnt; /* 1A */
|
||||
unsigned long biCompr; /* 1E */
|
||||
unsigned long biSizeIm; /* 22 */
|
||||
unsigned long biXPels; /* 26 */
|
||||
unsigned long biYPels; /* 2A */
|
||||
unsigned long biClrUsed; /* 2E */
|
||||
unsigned long biClrImp; /* 32 */
|
||||
/* 36 */
|
||||
}Bitmap_Head;
|
||||
|
||||
static struct
|
||||
{
|
||||
unsigned long bcWidth_bcHeight; /* 12 */
|
||||
unsigned long bcPlanes_bcBitCnt; /* 1A */
|
||||
}Bitmap_OS2_Head;
|
||||
|
||||
#define biBitCnt ((Bitmap_Head.biPlanes_biBitCnt & 0xffff0000) >> 16)
|
||||
#define bcBitCnt ((Bitmap_OS2_Head.biPlanes_biBitCnt & 0xffff0000) >> 16)
|
||||
#define bcHeight ((Bitmap_OS2_Head.bcWidth_bcHeight & 0xffff0000) >> 16)
|
||||
#define bcWidth (Bitmap_OS2_Head.bcWidth_bcHeight & 0x0000ffff)
|
|
@ -1,156 +0,0 @@
|
|||
/******************************************************************************/
|
||||
/* Peter Kirchgessner */
|
||||
/* e-mail: pkirchg@aol.com */
|
||||
/* WWW : http://members.aol.com/pkirchg */
|
||||
/******************************************************************************/
|
||||
/* #BEG-HDR */
|
||||
/* */
|
||||
/* Package : FITS reading/writing library */
|
||||
/* Modul-Name : fitsrw.h */
|
||||
/* Description : Include file for FITS-r/w-library */
|
||||
/* Function(s) : */
|
||||
/* Author : P. Kirchgessner */
|
||||
/* Date of Gen. : 12-Apr-97 */
|
||||
/* Last modified : 17-May-97 */
|
||||
/* Version : 0.10 */
|
||||
/* Compiler Opt. : */
|
||||
/* Changes : */
|
||||
/* */
|
||||
/* #END-HDR */
|
||||
/******************************************************************************/
|
||||
|
||||
#ifndef FITS_MAX_AXIS
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define FITS_CARD_SIZE 80
|
||||
#define FITS_RECORD_SIZE 2880
|
||||
#define FITS_MAX_AXIS 999
|
||||
|
||||
#define FITS_NADD_CARDS 128
|
||||
|
||||
/* Data representations */
|
||||
typedef unsigned char FITS_BITPIX8;
|
||||
typedef short FITS_BITPIX16;
|
||||
typedef long FITS_BITPIX32;
|
||||
typedef float FITS_BITPIXM32;
|
||||
typedef double FITS_BITPIXM64;
|
||||
|
||||
typedef int FITS_BOOL;
|
||||
typedef long FITS_LONG;
|
||||
typedef double FITS_DOUBLE;
|
||||
typedef char FITS_STRING[FITS_CARD_SIZE];
|
||||
|
||||
typedef enum {
|
||||
typ_bitpix8, typ_bitpix16, typ_bitpix32, typ_bitpixm32, typ_bitpixm64,
|
||||
typ_fbool, typ_flong, typ_fdouble, typ_fstring
|
||||
} FITS_DATA_TYPES;
|
||||
|
||||
/* How to transform FITS pixel values */
|
||||
typedef struct {
|
||||
double pixmin, pixmax; /* Pixel values [pixmin,pixmax] should be mapped */
|
||||
double datamin, datamax; /* to [datamin,datamax] */
|
||||
double replacement; /* datavalue to use for blank or NaN pixels */
|
||||
char dsttyp; /* Destination typ ('c' = char) */
|
||||
} FITS_PIX_TRANSFORM;
|
||||
|
||||
typedef union {
|
||||
FITS_BITPIX8 bitpix8;
|
||||
FITS_BITPIX16 bitpix16;
|
||||
FITS_BITPIX32 bitpix32;
|
||||
FITS_BITPIXM32 bitpixm32;
|
||||
FITS_BITPIXM64 bitpixm64;
|
||||
|
||||
FITS_BOOL fbool;
|
||||
FITS_LONG flong;
|
||||
FITS_DOUBLE fdouble;
|
||||
FITS_STRING fstring;
|
||||
} FITS_DATA;
|
||||
|
||||
typedef struct fits_record_list { /* Record list */
|
||||
unsigned char data[FITS_RECORD_SIZE];
|
||||
struct fits_record_list *next_record;
|
||||
} FITS_RECORD_LIST;
|
||||
|
||||
|
||||
typedef struct fits_hdu_list { /* Header and Data Unit List */
|
||||
long header_offset; /* Offset of header in the file */
|
||||
long data_offset; /* Offset of data in the file */
|
||||
long data_size; /* Size of data in the HDU (including pad)*/
|
||||
long udata_size; /* Size of used data in the HDU (excl. pad) */
|
||||
int bpp; /* Bytes per pixel */
|
||||
int numpic; /* Number of interpretable images in HDU */
|
||||
int naddcards; /* Number of additional cards */
|
||||
char addcards[FITS_NADD_CARDS][FITS_CARD_SIZE];
|
||||
struct {
|
||||
char nan_value; /* NaN's found in data ? */
|
||||
char blank_value; /* Blanks found in data ? */
|
||||
/* Flags specifying if some cards are used */
|
||||
char blank; /* The corresponding data below is only */
|
||||
char datamin; /* valid, if the flag is set. */
|
||||
char datamax;
|
||||
char simple; /* This indicates a simple HDU */
|
||||
char xtension; /* This indicates an extension */
|
||||
char gcount;
|
||||
char pcount;
|
||||
char bzero;
|
||||
char bscale;
|
||||
char groups;
|
||||
char extend;
|
||||
} used;
|
||||
double pixmin, pixmax; /* Minimum/Maximum pixel values */
|
||||
/* Some decoded data of the HDU: */
|
||||
int naxis; /* Number of axes */
|
||||
int naxisn[FITS_MAX_AXIS]; /* Sizes of axes (NAXIS1 --> naxisn[0]) */
|
||||
int bitpix; /* Data representation (8,16,32,-16,-32) */
|
||||
/* When using the following data, */
|
||||
/* the used-flags must be checked before. */
|
||||
long blank; /* Blank value */
|
||||
double datamin, datamax; /* Minimum/Maximum physical data values */
|
||||
char xtension[FITS_CARD_SIZE]; /* Type of extension */
|
||||
long gcount, pcount; /* Used by XTENSION */
|
||||
double bzero, bscale; /* Transformation values */
|
||||
int groups; /* Random groups indicator */
|
||||
int extend; /* Extend flag */
|
||||
|
||||
FITS_RECORD_LIST *header_record_list; /* Header records read in */
|
||||
struct fits_hdu_list *next_hdu;
|
||||
} FITS_HDU_LIST;
|
||||
|
||||
|
||||
typedef struct {
|
||||
FILE *fp; /* File pointer to fits file */
|
||||
char openmode; /* Mode the file was opened (0, 'r', 'w') */
|
||||
|
||||
int n_hdu; /* Number of HDUs in file */
|
||||
int n_pic; /* Total number of interpretable pictures */
|
||||
int nan_used; /* NaN's used in the file ? */
|
||||
int blank_used; /* Blank's used in the file ? */
|
||||
|
||||
FITS_HDU_LIST *hdu_list; /* Header and Data Unit List */
|
||||
} FITS_FILE;
|
||||
|
||||
|
||||
/* User callable functions of the FITS-library */
|
||||
|
||||
FITS_FILE *fits_open (char *filename, char *openmode);
|
||||
void fits_close (FITS_FILE *ff);
|
||||
FITS_HDU_LIST *fits_add_hdu (FITS_FILE *ff);
|
||||
int fits_add_card (FITS_HDU_LIST *hdulist, char *card);
|
||||
int fits_write_header (FITS_FILE *ff, FITS_HDU_LIST *hdulist);
|
||||
FITS_HDU_LIST *fits_image_info (FITS_FILE *ff, int picind, int *hdupicind);
|
||||
FITS_HDU_LIST *fits_seek_image (FITS_FILE *ff, int picind);
|
||||
void fits_print_header (FITS_HDU_LIST *hdr);
|
||||
FITS_DATA *fits_decode_card (const char *card, FITS_DATA_TYPES data_type);
|
||||
char *fits_search_card (FITS_RECORD_LIST *rl, char *keyword);
|
||||
int fits_read_pixel (FITS_FILE *ff, FITS_HDU_LIST *hdulist,
|
||||
int npix, FITS_PIX_TRANSFORM *trans, void *buf);
|
||||
|
||||
char *fits_get_error (void);
|
||||
|
||||
/* Demo functions */
|
||||
#define FITS_NO_DEMO
|
||||
int fits_to_pgmraw (char *fitsfile, char *pgmfile);
|
||||
int pgmraw_to_fits (char *pgmfile, char *fitsfile);
|
||||
|
||||
#endif
|
212
plug-ins/fp.h
212
plug-ins/fp.h
|
@ -1,212 +0,0 @@
|
|||
#define MAX_PREVIEW_SIZE 125
|
||||
#define MAX_ROUGHNESS 128
|
||||
#define RANGE_HEIGHT 15
|
||||
#define PR_BX_BRDR 10
|
||||
#define ALL 255
|
||||
|
||||
#define RANGE_ADJUST_MASK GDK_EXPOSURE_MASK | \
|
||||
GDK_ENTER_NOTIFY_MASK | \
|
||||
GDK_BUTTON_PRESS_MASK | \
|
||||
GDK_BUTTON_RELEASE_MASK | \
|
||||
GDK_BUTTON1_MOTION_MASK | \
|
||||
GDK_POINTER_MOTION_HINT_MASK
|
||||
|
||||
|
||||
typedef struct {
|
||||
gint run;
|
||||
} fpInterface;
|
||||
|
||||
typedef double hsv;
|
||||
|
||||
typedef struct {
|
||||
gint width;
|
||||
gint height;
|
||||
guchar *rgb;
|
||||
hsv *hsv;
|
||||
guchar *mask;
|
||||
} ReducedImage;
|
||||
|
||||
typedef enum {
|
||||
SHADOWS,
|
||||
MIDTONES,
|
||||
HIGHLIGHTS,
|
||||
INTENSITIES
|
||||
}FP_Intensity;
|
||||
|
||||
enum {
|
||||
NONEATALL =0,
|
||||
CURRENT =1,
|
||||
HUE =2,
|
||||
SATURATION =4,
|
||||
VALUE =8
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
RED,
|
||||
GREEN,
|
||||
BLUE,
|
||||
CYAN,
|
||||
YELLOW,
|
||||
MAGENTA,
|
||||
ALL_PRIMARY
|
||||
};
|
||||
|
||||
enum {
|
||||
DOWN = -1,
|
||||
UP = 1
|
||||
};
|
||||
|
||||
enum {
|
||||
BY_HUE,
|
||||
BY_SAT,
|
||||
BY_VAL,
|
||||
JUDGE_BY
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *window;
|
||||
GtkWidget *shadowsEntry;
|
||||
GtkWidget *midtonesEntry;
|
||||
GtkWidget *rangePreview;
|
||||
GtkWidget *aliasingPreview;
|
||||
GtkObject *aliasingData;
|
||||
GtkWidget *aliasingGraph;
|
||||
} AdvancedWindow;
|
||||
|
||||
|
||||
typedef struct {
|
||||
int Color;
|
||||
float Rough;
|
||||
GtkWidget *roughnessScale;
|
||||
float Alias;
|
||||
GtkWidget *aliasingScale;
|
||||
float PreviewSize;
|
||||
GtkWidget *previewSizeScale;
|
||||
FP_Intensity Range;
|
||||
gint ValueBy;
|
||||
gint SlctnOnly;
|
||||
gint RealTime;
|
||||
guchar Offset;
|
||||
guchar VisibleFrames;
|
||||
guchar Cutoffs[INTENSITIES];
|
||||
gint Touched[JUDGE_BY];
|
||||
gint redAdj[JUDGE_BY][256];
|
||||
gint blueAdj[JUDGE_BY][256];
|
||||
gint greenAdj[JUDGE_BY][256];
|
||||
gint satAdj[JUDGE_BY][256];
|
||||
GtkWidget *rangeLabels[12];
|
||||
}FP_Params;
|
||||
|
||||
GtkWidget *fp_create_bna(void);
|
||||
GtkWidget *fp_create_rough(void);
|
||||
GtkWidget *fp_create_range(void);
|
||||
GtkWidget *fp_create_circle_palette(void);
|
||||
GtkWidget *fp_create_lnd(void);
|
||||
GtkWidget *fp_create_show(void);
|
||||
GtkWidget *fp_create_msnls();
|
||||
GtkWidget *fp_create_frame_select();
|
||||
GtkWidget *fp_create_pixels_select_by();
|
||||
|
||||
void fp_show_hide_frame(GtkWidget *button,
|
||||
GtkWidget *frame);
|
||||
|
||||
|
||||
ReducedImage *Reduce_The_Image (GDrawable *,
|
||||
GDrawable *,
|
||||
gint,
|
||||
gint);
|
||||
|
||||
void fp_render_preview (GtkWidget *,
|
||||
gint,
|
||||
gint );
|
||||
|
||||
void Update_Current_FP (gint,
|
||||
gint );
|
||||
|
||||
void fp_Create_Nudge (gint* );
|
||||
|
||||
gint fp_dialog (void);
|
||||
gint fp_advanced_dialog (void);
|
||||
|
||||
void fp_advanced_call (void);
|
||||
|
||||
void fp_entire_image (GtkWidget *,
|
||||
gpointer );
|
||||
void fp_selection_only (GtkWidget *,
|
||||
gpointer );
|
||||
|
||||
void fp_selection_in_context (GtkWidget *,
|
||||
gpointer );
|
||||
|
||||
void selectionMade (GtkWidget *,
|
||||
gpointer );
|
||||
void fp_close_callback (GtkWidget *,
|
||||
gpointer );
|
||||
void fp_ok_callback (GtkWidget *,
|
||||
gpointer );
|
||||
void fp_scale_update (GtkAdjustment *,
|
||||
float* );
|
||||
void fp_change_current_range (GtkAdjustment*,
|
||||
gint* );
|
||||
void fp_change_current_pixels_by (GtkWidget *,
|
||||
gint *);
|
||||
void resetFilterPacks (void);
|
||||
|
||||
void update_range_labels (void);
|
||||
|
||||
void fp_create_smoothness_graph (GtkWidget* );
|
||||
|
||||
void fp_range_preview_spill (GtkWidget*,
|
||||
gint );
|
||||
|
||||
void Create_A_Preview (GtkWidget **,
|
||||
GtkWidget **,
|
||||
int,
|
||||
int );
|
||||
|
||||
void Create_A_Table_Entry (GtkWidget **,
|
||||
GtkWidget *,
|
||||
char *);
|
||||
|
||||
GSList* Button_In_A_Box (GtkWidget *,
|
||||
GSList *,
|
||||
guchar *,
|
||||
GtkSignalFunc,
|
||||
gpointer,
|
||||
int );
|
||||
|
||||
void Check_Button_In_A_Box (GtkWidget *,
|
||||
guchar *label,
|
||||
GtkSignalFunc func,
|
||||
gpointer data,
|
||||
int clicked);
|
||||
|
||||
void Adjust_Preview_Sizes (int width,
|
||||
int height );
|
||||
void refreshPreviews (int);
|
||||
void initializeFilterPacks (void);
|
||||
|
||||
void fp (GDrawable *drawable);
|
||||
void fp_row (const guchar *src_row,
|
||||
guchar *dest_row,
|
||||
gint row,
|
||||
gint row_width,
|
||||
gint bytes);
|
||||
|
||||
void draw_slider (GdkWindow *window,
|
||||
GdkGC *border_gc,
|
||||
GdkGC *fill_gc,
|
||||
int xpos);
|
||||
gint FP_Range_Change_Events (GtkWidget *,
|
||||
GdkEvent *,
|
||||
FP_Params *);
|
||||
|
||||
void As_You_Drag (GtkWidget *button);
|
||||
void preview_size_scale_update (GtkAdjustment *adjustment,
|
||||
float *scale_val);
|
||||
void ErrorMessage (guchar *);
|
||||
|
||||
|
||||
void fp_advanced_ok();
|
|
@ -1,13 +0,0 @@
|
|||
void rgb_to_hsv (hsv r,
|
||||
hsv g,
|
||||
hsv b,
|
||||
hsv *h,
|
||||
hsv *s,
|
||||
hsv *l);
|
||||
|
||||
void hsv_to_rgb (hsv h,
|
||||
hsv sl,
|
||||
hsv l,
|
||||
hsv *r,
|
||||
hsv *g,
|
||||
hsv *b);
|
|
@ -1,55 +0,0 @@
|
|||
#ident "@(#)g3.h 3.1 95/08/30 Copyright (c) Gert Doering"
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0L
|
||||
#endif
|
||||
|
||||
/* nr_bits is set to ( bit_length MOD FBITS ) by build_g3_tree,
|
||||
* nr_pels is the number of pixels to write for that code,
|
||||
* bit_code is the code itself (msb2lsb), and bit_length its length
|
||||
*/
|
||||
|
||||
struct g3code { int nr_bits, nr_pels, bit_code, bit_length; };
|
||||
|
||||
/* tables for makeup / terminal codes white / black, extended m_codes */
|
||||
extern struct g3code t_white[], m_white[], t_black[], m_black[], m_ext[];
|
||||
|
||||
/* The number of bits looked up simultaneously determines the amount
|
||||
* of memory used by the program - some values:
|
||||
* 10 bits : 87 Kbytes, 8 bits : 20 Kbytes
|
||||
* 5 bits : 6 Kbytes, 1 bit : 4 Kbytes
|
||||
* - naturally, using less bits is also slower...
|
||||
*/
|
||||
|
||||
/*
|
||||
#define FBITS 5
|
||||
#define BITM 0x1f
|
||||
*/
|
||||
|
||||
#define FBITS 8
|
||||
#define BITM 0xff
|
||||
|
||||
/*
|
||||
#define FBITS 12
|
||||
#define BITM 0xfff
|
||||
*/
|
||||
|
||||
#define BITN 1<<FBITS
|
||||
|
||||
struct g3_tree { int nr_bits;
|
||||
struct g3_tree * nextb[ BITN ];
|
||||
};
|
||||
|
||||
#define g3_leaf g3code
|
||||
|
||||
extern void tree_add_node ( struct g3_tree *p, struct g3code * g3c,
|
||||
int bit_code, int bit_length );
|
||||
extern void build_tree ( struct g3_tree ** p, struct g3code * c );
|
||||
|
||||
#ifdef DEBUG
|
||||
extern void print_g3_tree ( char * t, struct g3_tree * p );
|
||||
#endif
|
||||
|
||||
extern void init_byte_tab ( int reverse, int byte_tab[] );
|
||||
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* IfsCompose is a interface for creating IFS fractals by
|
||||
* direct manipulation.
|
||||
* Copyright (C) 1997 Owen Taylor
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#define SQR(x) ((x) * (x))
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
typedef struct {
|
||||
gdouble a11,a12,a21,a22,b1,b2;
|
||||
} Aff2;
|
||||
|
||||
typedef struct {
|
||||
gdouble vals[3][4];
|
||||
} Aff3;
|
||||
|
||||
typedef struct {
|
||||
GdkPoint *points;
|
||||
gint npoints;
|
||||
} IPolygon;
|
||||
|
||||
typedef struct {
|
||||
gdouble vals[3];
|
||||
} IfsColor;
|
||||
|
||||
typedef struct {
|
||||
gdouble x, y;
|
||||
gdouble theta;
|
||||
gdouble scale;
|
||||
gdouble asym;
|
||||
gdouble shear;
|
||||
gint flip;
|
||||
|
||||
IfsColor red_color;
|
||||
IfsColor green_color;
|
||||
IfsColor blue_color;
|
||||
IfsColor black_color;
|
||||
|
||||
IfsColor target_color;
|
||||
gdouble hue_scale;
|
||||
gdouble value_scale;
|
||||
|
||||
gint simple_color;
|
||||
gdouble prob;
|
||||
} AffElementVals;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint num_elements;
|
||||
gint iterations;
|
||||
gint max_memory;
|
||||
gint subdivide;
|
||||
gdouble radius;
|
||||
gdouble aspect_ratio;
|
||||
gdouble center_x;
|
||||
gdouble center_y;
|
||||
} IfsComposeVals;
|
||||
|
||||
typedef struct {
|
||||
AffElementVals v;
|
||||
|
||||
Aff2 trans;
|
||||
Aff3 color_trans;
|
||||
|
||||
gchar *name;
|
||||
|
||||
IPolygon *click_boundary;
|
||||
IPolygon *draw_boundary;
|
||||
} AffElement;
|
||||
|
||||
/* manipulation of affine transforms */
|
||||
void aff2_translate(Aff2 *naff, gdouble x, gdouble y);
|
||||
void aff2_rotate(Aff2 *naff, gdouble theta);
|
||||
void aff2_scale(Aff2 *naff, gdouble s, gint flip);
|
||||
void aff2_distort(Aff2 *naff, gdouble asym, gdouble shear);
|
||||
void aff2_compute_stretch(Aff2 *naff,
|
||||
gdouble xo, gdouble yo,
|
||||
gdouble xn, gdouble yn);
|
||||
void aff2_compute_distort(Aff2 *naff,
|
||||
gdouble xo, gdouble yo,
|
||||
gdouble xn, gdouble yn);
|
||||
void aff2_compose(Aff2 *naff, Aff2 *aff1, Aff2 *aff2);
|
||||
void aff2_invert(Aff2 *naff, Aff2 *aff);
|
||||
void aff2_apply(Aff2 *aff, gdouble x, gdouble y,
|
||||
gdouble *xf, gdouble *yf);
|
||||
void aff2_fixed_point(Aff2 *aff, gdouble *xf, gdouble *yf);
|
||||
void aff3_apply (Aff3 *t, gdouble x, gdouble y, gdouble z,
|
||||
gdouble *xf, gdouble *yf, gdouble *zf);
|
||||
|
||||
/* manipulation of polygons */
|
||||
IPolygon *ipolygon_convex_hull(IPolygon *poly);
|
||||
gint ipolygon_contains(IPolygon *poly, gint xt, gint yt);
|
||||
|
||||
/* manipulation of composite transforms */
|
||||
AffElement *aff_element_new(gdouble x, gdouble y,IfsColor color,gint count);
|
||||
void aff_element_free(AffElement *elem);
|
||||
void aff_element_compute_trans(AffElement *elem, gdouble width,
|
||||
gdouble height,
|
||||
gdouble center_x, gdouble center_y);
|
||||
void aff_element_compute_color_trans(AffElement *elem);
|
||||
void aff_element_decompose_trans(AffElement *elem, Aff2 *aff,
|
||||
gdouble width, gdouble height,
|
||||
gdouble center_x, gdouble center_y);
|
||||
void aff_element_compute_boundary(AffElement *elem, gint width,
|
||||
gint height,
|
||||
AffElement **elements,
|
||||
int num_elements);
|
||||
void aff_element_draw(AffElement *elem, gint selected,
|
||||
gint width, gint height,
|
||||
GdkDrawable *win,
|
||||
GdkGC *normal_gc,GdkGC *selected_gc,
|
||||
GdkFont *font);
|
||||
|
||||
void ifs_render(AffElement **elements, gint num_elements,
|
||||
gint width, gint height, gint nsteps,
|
||||
IfsComposeVals *vals, gint band_y, gint band_height,
|
||||
guchar *data, guchar *mask, guchar *nhits, gint preview);
|
File diff suppressed because one or more lines are too long
|
@ -1,32 +0,0 @@
|
|||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define STDWIDTH 80.0
|
||||
#define STDDEPTH 15.0
|
||||
#define STDUPDOWN 0
|
||||
#define STDFROMLEFT 0
|
||||
|
||||
extern gint magic_dialog(void);
|
||||
extern gint magiceye_constrain(gint32 image, gint32 drawable_ID, gpointer data);
|
||||
extern void toggle_update(GtkWidget *widget, gpointer data);
|
||||
extern void drawable_callback(gint32 id, gpointer data);
|
||||
extern void ok_callback(GtkWidget *widget, gpointer data);
|
||||
extern void close_callback(GtkWidget *widget, gpointer data);
|
||||
extern void magiceye_update(GtkWidget *widget, gpointer data);
|
||||
extern void scale_update (GtkAdjustment *adjustment, double *scale_val);
|
||||
|
||||
extern gdouble strip_width;
|
||||
extern gdouble depth;
|
||||
extern gint from_left;
|
||||
extern gint up_down;
|
||||
extern gint magiceye_ID;
|
||||
extern GDrawable *map_drawable;
|
||||
extern gint magiceye (GDrawable *mapimage, gint32 *layer);
|
||||
|
||||
extern void query(void);
|
||||
extern void run(char *name,
|
||||
int nparams,
|
||||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
|
@ -1,106 +0,0 @@
|
|||
/**************************************************
|
||||
* file: megawidget/megawidget.h
|
||||
*
|
||||
* Copyright (c) 1997 Eric L. Hernes (erich@rrnet.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software withough specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef MEGAWIDGET_H
|
||||
|
||||
struct mwRadioGroup {
|
||||
gchar *name;
|
||||
gint var;
|
||||
};
|
||||
struct mwValueRadioGroup {
|
||||
gchar *name;
|
||||
gint val;
|
||||
};
|
||||
|
||||
struct mwPreview {
|
||||
gint width;
|
||||
gint height;
|
||||
gint bpp;
|
||||
gdouble scale;
|
||||
guchar *bits;
|
||||
};
|
||||
|
||||
struct mwColorSel {
|
||||
gdouble *color;
|
||||
gdouble savcolor[4];
|
||||
gint opacity;
|
||||
guchar *name;
|
||||
GtkWidget *window;
|
||||
GtkWidget *preview;
|
||||
};
|
||||
|
||||
#ifndef PREVIEW_SIZE
|
||||
#define PREVIEW_SIZE 100
|
||||
#endif
|
||||
|
||||
GtkWidget *mw_app_new(gchar *resname, gchar *appname, gint *runpp);
|
||||
void mw_fscale_entry_new(GtkWidget *table, char *name,
|
||||
gfloat lorange, gfloat hirange,
|
||||
gfloat st_inc, gfloat pg_inc, gfloat pgsiz,
|
||||
gint left_a, gint right_a, gint top_a,
|
||||
gint bottom_a, gdouble *var);
|
||||
void mw_iscale_entry_new(GtkWidget *table, char *name,
|
||||
gint lorange, gint hirange,
|
||||
gint st_inc, gint pg_inc, gint pgsiz,
|
||||
gint left_a, gint right_a, gint top_a,
|
||||
gint bottom_a, gint *var);
|
||||
|
||||
GSList *mw_radio_new(GSList *gsl, GtkWidget *parent, gchar *name,
|
||||
gint *varp, gint init);
|
||||
GSList *mw_radio_group_new(GtkWidget *parent, gchar *name,
|
||||
struct mwRadioGroup *rg);
|
||||
gint mw_radio_result(struct mwRadioGroup *rg);
|
||||
GSList * mw_value_radio_group_new(GtkWidget *parent, gchar *name,
|
||||
struct mwValueRadioGroup *rg, gint *var);
|
||||
|
||||
GtkWidget *mw_toggle_button_new(GtkWidget *parent, gchar *fname,
|
||||
gchar *label, gint *varp);
|
||||
GtkWidget *mw_ientry_button_new(GtkWidget *parent, gchar *fname,
|
||||
gchar *name, gint *varp);
|
||||
GtkWidget *mw_fentry_button_new(GtkWidget *parent, gchar *fname,
|
||||
gchar *name, gdouble *varp);
|
||||
struct mwColorSel *mw_color_select_button_create(GtkWidget *parent,
|
||||
gchar *name,
|
||||
gdouble *color,
|
||||
gint opacity);
|
||||
|
||||
void mw_ientry_new(GtkWidget *parent, gchar *fname,
|
||||
gchar *name, gint *varp);
|
||||
void mw_fentry_new(GtkWidget *parent, gchar *fname,
|
||||
gchar *name, gdouble *varp);
|
||||
|
||||
typedef void mw_preview_t (GtkWidget *pvw);
|
||||
|
||||
GtkWidget *mw_preview_new(GtkWidget *parent, struct mwPreview *mwp,
|
||||
mw_preview_t *fcn);
|
||||
|
||||
struct mwPreview *mw_preview_build(GDrawable *drw);
|
||||
struct mwPreview *mw_preview_build_virgin(GDrawable *drw);
|
||||
|
||||
#endif /* MEGAWIDGET_H */
|
||||
/* end of megawidget/megawidget.h */
|
File diff suppressed because it is too large
Load Diff
147
plug-ins/print.h
147
plug-ins/print.h
|
@ -1,147 +0,0 @@
|
|||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Print plug-in header file for the GIMP.
|
||||
*
|
||||
* Copyright 1997 Michael Sweet (mike@easysw.com)
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Revision History:
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1.1.1 1997/11/24 22:03:35 sopwith
|
||||
* Let's try this import one last time.
|
||||
*
|
||||
* Revision 1.3 1997/10/03 22:18:15 nobody
|
||||
* updated print er too the latest version
|
||||
*
|
||||
* : ----------------------------------------------------------------------
|
||||
*
|
||||
* Revision 1.7 1997/10/02 17:57:26 mike
|
||||
* Added gamma/dot gain correction values for all printers.
|
||||
*
|
||||
* Revision 1.6 1997/07/30 20:33:05 mike
|
||||
* Final changes for 1.1 release.
|
||||
*
|
||||
* Revision 1.5 1997/07/30 18:47:39 mike
|
||||
* Added scaling, orientation, and offset options.
|
||||
*
|
||||
* Revision 1.4 1997/07/26 18:43:04 mike
|
||||
* Updated version number to 1.1.
|
||||
*
|
||||
* Revision 1.3 1997/07/03 13:26:46 mike
|
||||
* Updated documentation for 1.0 release.
|
||||
*
|
||||
* Revision 1.2 1997/07/02 13:51:53 mike
|
||||
* Added rgb_to_rgb and gray_to_gray conversion functions.
|
||||
* Standardized calling args to conversion functions.
|
||||
*
|
||||
* Revision 1.2 1997/07/02 13:51:53 mike
|
||||
* Added rgb_to_rgb and gray_to_gray conversion functions.
|
||||
* Standardized calling args to conversion functions.
|
||||
*
|
||||
* Revision 1.1 1997/06/19 02:18:15 mike
|
||||
* Initial revision
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary header files...
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
|
||||
/*
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
#define PLUG_IN_VERSION "1.2 - 2 October 1997"
|
||||
#define PLUG_IN_NAME "Print"
|
||||
|
||||
#define MEDIA_LETTER 0 /* 8.5x11" a.k.a. "A" size */
|
||||
#define MEDIA_LEGAL 1 /* 8.5x14" */
|
||||
#define MEDIA_TABLOID 2 /* 11x17" a.k.a. "B" size */
|
||||
#define MEDIA_A4 3 /* 8.27x11.69" (210x297mm) */
|
||||
#define MEDIA_A3 4 /* 11.69x16.54" (297x420mm) */
|
||||
|
||||
#define OUTPUT_GRAY 0 /* Grayscale output */
|
||||
#define OUTPUT_COLOR 1 /* Color output */
|
||||
|
||||
#define ORIENT_AUTO -1 /* Best orientation */
|
||||
#define ORIENT_PORTRAIT 0 /* Portrait orientation */
|
||||
#define ORIENT_LANDSCAPE 1 /* Landscape orientation */
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif /* !MIN */
|
||||
|
||||
|
||||
/*
|
||||
* Printer driver control structure. See "print.c" for the actual list...
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *long_name, /* Long name for UI */
|
||||
*short_name; /* Short name for printrc file */
|
||||
int xdpi, /* X resolution */
|
||||
ydpi, /* Y resolution */
|
||||
large_sizes, /* TRUE if supports large sizes */
|
||||
color, /* TRUE if supports color */
|
||||
model; /* Model number */
|
||||
float gamma, /* Gamma correction */
|
||||
density; /* Ink "density" or black level */
|
||||
void (*print)(FILE *prn, GDrawable *drawable, int media_size,
|
||||
int xdpi, int ydpi, int output_type, int model,
|
||||
guchar *lut, guchar *cmap, int orientation,
|
||||
int scaling, int left, int top);
|
||||
/* Print function */
|
||||
} printer_t;
|
||||
|
||||
typedef void (*convert_t)(guchar *in, guchar *out, int width, int bpp, guchar *lut, guchar *cmap);
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes...
|
||||
*/
|
||||
|
||||
extern void dither_black(guchar *, int, int, int, unsigned char *);
|
||||
extern void dither_cmyk(guchar *, int, int, int, unsigned char *,
|
||||
unsigned char *, unsigned char *, unsigned char *);
|
||||
extern void gray_to_gray(guchar *, guchar *, int, int, guchar *, guchar *);
|
||||
extern void indexed_to_gray(guchar *, guchar *, int, int, guchar *, guchar *);
|
||||
extern void indexed_to_rgb(guchar *, guchar *, int, int, guchar *, guchar *);
|
||||
extern int media_width(int, int);
|
||||
extern int media_height(int, int);
|
||||
extern void rgb_to_gray(guchar *, guchar *, int, int, guchar *, guchar *);
|
||||
extern void rgb_to_rgb(guchar *, guchar *, int, int, guchar *, guchar *);
|
||||
|
||||
extern void escp2_print(FILE *, GDrawable *, int, int, int, int, int, guchar *, guchar *, int, int, int, int);
|
||||
extern void pcl_print(FILE *, GDrawable *, int, int, int, int, int, guchar *, guchar *, int, int, int, int);
|
||||
extern void ps_print(FILE *, GDrawable *, int, int, int, int, int, guchar *, guchar *, int, int, int, int);
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
104
plug-ins/sgi.h
104
plug-ins/sgi.h
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* SGI image file format library definitions.
|
||||
*
|
||||
* Copyright 1997 Michael Sweet (mike@easysw.com)
|
||||
*
|
||||
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Revision History:
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1.1.1 1997/11/24 22:03:36 sopwith
|
||||
* Let's try this import one last time.
|
||||
*
|
||||
* Revision 1.3 1997/09/30 09:16:02 nobody
|
||||
* work I men it...
|
||||
*
|
||||
* Revision 1.2 1997/06/18 00:55:28 mike
|
||||
* Updated to hold length table when writing.
|
||||
* Updated to hold current length when doing ARLE.
|
||||
*
|
||||
* Revision 1.1 1997/06/15 03:37:19 mike
|
||||
* Initial revision
|
||||
*/
|
||||
|
||||
#ifndef _SGI_H_
|
||||
# define _SGI_H_
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
|
||||
/*
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define SGI_MAGIC 474 /* Magic number in image file */
|
||||
|
||||
# define SGI_READ 0 /* Read from an SGI image file */
|
||||
# define SGI_WRITE 1 /* Write to an SGI image file */
|
||||
|
||||
# define SGI_COMP_NONE 0 /* No compression */
|
||||
# define SGI_COMP_RLE 1 /* Run-length encoding */
|
||||
# define SGI_COMP_ARLE 2 /* Agressive run-length encoding */
|
||||
|
||||
|
||||
/*
|
||||
* Image structure...
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FILE *file; /* Image file */
|
||||
int mode, /* File open mode */
|
||||
bpp, /* Bytes per pixel/channel */
|
||||
comp; /* Compression */
|
||||
unsigned short xsize, /* Width in pixels */
|
||||
ysize, /* Height in pixels */
|
||||
zsize; /* Number of channels */
|
||||
long firstrow, /* File offset for first row */
|
||||
nextrow, /* File offset for next row */
|
||||
**table, /* Offset table for compression */
|
||||
**length; /* Length table for compression */
|
||||
short *arle_row; /* Advanced RLE compression buffer */
|
||||
long arle_offset, /* Advanced RLE buffer offset */
|
||||
arle_length; /* Advanced RLE buffer length */
|
||||
} sgi_t;
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes...
|
||||
*/
|
||||
|
||||
extern int sgiClose(sgi_t *sgip);
|
||||
extern int sgiGetRow(sgi_t *sgip, short *row, int y, int z);
|
||||
extern sgi_t *sgiOpen(char *filename, int mode, int comp, int bpp,
|
||||
int xsize, int ysize, int zsize);
|
||||
extern int sgiPutRow(sgi_t *sgip, short *row, int y, int z);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif /* !_SGI_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue