u7shp.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>

Include dependency graph for u7shp.c:

Go to the source code of this file.

Classes

struct  u7frame
struct  u7shape

Defines

#define GIMP20_CONST   const

Functions

static void query (void)
static void run (const gchar *name, gint nparams, const GimpParam *param, gint *nreturn_vals, GimpParam **return_vals)
static void load_palette (gchar *filename)
static void choose_palette (void)
static gint32 load_image (gchar *filename)
static gint32 save_image (gchar *filename, gint32 image_ID, gint32 drawable_ID, gint32 orig_image_ID)
unsigned int read1 (FILE *f)
unsigned int read2 (FILE *f)
signed int read2signed (FILE *f)
unsigned int read4 (FILE *f)
void write1 (FILE *f, unsigned char b)
void write2 (FILE *f, unsigned int b)
void write4 (FILE *f, unsigned int b)
unsigned char * out1 (unsigned char *p, unsigned char b)
unsigned char * out2 (unsigned char *p, unsigned int b)
unsigned char * out4 (unsigned char *p, unsigned int b)
static void file_sel_delete (GtkWidget *widget, GtkWidget **file_sel)
static void file_selected (GtkWidget *widget, gboolean *selected)
gchar * file_select (gchar *title)
static int find_runs (short *runs, unsigned char *pixptr, int x, int w)
static int skip_transparent (unsigned char **pixptr, int x, int w)

Variables

static GimpRunMode run_mode
static guchar gimp_cmap [768]
GimpPlugInInfo PLUG_IN_INFO


Define Documentation

#define GIMP20_CONST   const

Definition at line 28 of file u7shp.c.


Function Documentation

static void choose_palette ( void   )  [static]

Definition at line 403 of file u7shp.c.

References file_select(), and load_palette().

Referenced by run().

Here is the call graph for this function:

static void file_sel_delete ( GtkWidget *  widget,
GtkWidget **  file_sel 
) [static]

Definition at line 359 of file u7shp.c.

Referenced by file_select().

gchar* file_select ( gchar *  title  ) 

Definition at line 370 of file u7shp.c.

References file_sel_delete(), and file_selected().

Referenced by choose_palette().

Here is the call graph for this function:

static void file_selected ( GtkWidget *  widget,
gboolean *  selected 
) [static]

Definition at line 365 of file u7shp.c.

Referenced by file_select().

static int find_runs ( short *  runs,
unsigned char *  pixptr,
int  x,
int  w 
) [static]

Definition at line 610 of file u7shp.c.

References run().

Referenced by save_image().

Here is the call graph for this function:

static gint32 load_image ( gchar *  filename  )  [static]

Definition at line 409 of file u7shp.c.

References Ucscript::frame, u7shape::frames, gimp_cmap, u7shape::num_frames, u7frame::pixels, read1(), read2(), read2signed(), and read4().

Referenced by run().

Here is the call graph for this function:

static void load_palette ( gchar *  filename  )  [static]

Definition at line 327 of file u7shp.c.

References gimp_cmap, len, and read1().

Referenced by choose_palette(), and main().

Here is the call graph for this function:

unsigned char* out1 ( unsigned char *  p,
unsigned char  b 
)

Definition at line 305 of file u7shp.c.

unsigned char* out2 ( unsigned char *  p,
unsigned int  b 
)

Definition at line 311 of file u7shp.c.

Referenced by save_image().

unsigned char* out4 ( unsigned char *  p,
unsigned int  b 
)

Definition at line 318 of file u7shp.c.

static void query ( void   )  [static]

Definition at line 147 of file u7shp.c.

unsigned int read1 ( FILE *  f  ) 

Definition at line 249 of file u7shp.c.

Referenced by load_image(), load_palette(), and load_shape().

unsigned int read2 ( FILE *  f  ) 

Definition at line 256 of file u7shp.c.

Referenced by load_image(), and load_shape().

signed int read2signed ( FILE *  f  ) 

Definition at line 265 of file u7shp.c.

Referenced by load_image(), and load_shape().

unsigned int read4 ( FILE *  f  ) 

Definition at line 276 of file u7shp.c.

Referenced by load_image(), load_shape(), merge_frames(), and split_shape().

static void run ( const gchar *  name,
gint  nparams,
const GimpParam *  param,
gint *  nreturn_vals,
GimpParam **  return_vals 
) [static]

Definition at line 205 of file u7shp.c.

References choose_palette(), u7frame::data, load_image(), run_mode, and save_image().

Referenced by Usecode_internal::call_usecode(), Find_runs(), and find_runs().

Here is the call graph for this function:

static gint32 save_image ( gchar *  filename,
gint32  image_ID,
gint32  drawable_ID,
gint32  orig_image_ID 
) [static]

Definition at line 654 of file u7shp.c.

References find_runs(), Ucscript::frame, u7shape::frames, k, len, u7shape::num_frames, out2(), u7frame::pixels, run_mode, skip_transparent(), write2(), and write4().

Here is the call graph for this function:

static int skip_transparent ( unsigned char **  pixptr,
int  x,
int  w 
) [static]

Definition at line 643 of file u7shp.c.

Referenced by save_image().

void write1 ( FILE *  f,
unsigned char  b 
)

Definition at line 286 of file u7shp.c.

void write2 ( FILE *  f,
unsigned int  b 
)

Definition at line 291 of file u7shp.c.

Referenced by save_image().

void write4 ( FILE *  f,
unsigned int  b 
)

Definition at line 297 of file u7shp.c.

Referenced by merge_frames(), save_image(), and split_shape().


Variable Documentation

guchar gimp_cmap[768] [static]

Definition at line 53 of file u7shp.c.

Referenced by load_image(), and load_palette().

GimpPlugInInfo PLUG_IN_INFO

Initial value:

{
  NULL,  
  NULL,  
  query, 
  run,   
}

Definition at line 119 of file u7shp.c.

GimpRunMode run_mode [static]

Definition at line 50 of file u7shp.c.

Referenced by run(), and save_image().


Generated on Mon Jul 9 14:45:07 2007 for ExultEngine by  doxygen 1.5.1