mirror of https://github.com/GNOME/gimp.git
updated refract and warp plugins changed the INSTALL file to reflect the
* updated refract and warp plugins * changed the INSTALL file to reflect the fact that gtk is a separate package * app/text_tool.c: small patch for indexed images and antialiased toggle -Yosh
This commit is contained in:
parent
89b600d2bc
commit
7e4a76203a
|
@ -1,3 +1,11 @@
|
|||
Thu Jan 29 01:05:10 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* updated refract and warp plugins
|
||||
* changed the INSTALL file to reflect the fact that gtk is a
|
||||
separate package
|
||||
* app/text_tool.c: small patch for indexed images and
|
||||
antialiased toggle
|
||||
|
||||
Thu Jan 29 00:00:54 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* removed all usage of linked.[ch] and switched to GSLists
|
||||
|
|
18
INSTALL
18
INSTALL
|
@ -51,27 +51,11 @@ recognizes. These are:
|
|||
the gimp uses to search for its configuration files from ~/.gimp (the
|
||||
directory .gimp in the users home directory) to DIR.
|
||||
|
||||
5. --with-libtiff=DIR. This option specifies the location of the
|
||||
tiff library and header files. For instance, the libtiff library
|
||||
may reside in "/usr/local". This may be specified by
|
||||
--with-libtiff="/usr/local". (Note: The compilation process
|
||||
should automatically find the tiff library if it resides in
|
||||
"/usr/local").
|
||||
|
||||
6. --with-libjpeg=DIR. This option specifies the location of the
|
||||
jpeg library and header files. For instance, the libjpeg library
|
||||
may reside in "/usr/local". This may be specified by
|
||||
--with-libjpeg="/usr/local". (Note: The compilation process
|
||||
should automatically find the tiff library if it resides in
|
||||
"/usr/local").
|
||||
|
||||
The `make' command builds several things:
|
||||
- The libraries `gtk+/glib/libglib.la', `gtk+/gdk/libgdk.la',
|
||||
`gtk+/gtk/libgtk.la', `libgimp/libgimp.la', `libgimp/libgimpi.la' and
|
||||
- The libraries `libgimp/libgimp.la', `libgimp/libgimpi.la' and
|
||||
`libgimp/libgimpui.la'. The `.la' suffix is used by libtool, the
|
||||
program used to ease the compilation of shared libraries on
|
||||
different platforms.
|
||||
- The test programs `gtk+/glib/testglib' and `gtk+/gtk/testgtk'.
|
||||
- The plug-in programs in the `plug-ins' subdirectory.
|
||||
- The main GIMP program in `app/gimp'.
|
||||
|
||||
|
|
|
@ -283,12 +283,19 @@ text_button_press (Tool *tool,
|
|||
{
|
||||
case RGB:
|
||||
case GRAY:
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_show (text_tool->antialias_toggle);
|
||||
if (GTK_TOGGLE_BUTTON (text_tool->antialias_toggle)->active)
|
||||
text_tool->antialias = TRUE;
|
||||
else
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
case INDEXED:
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_hide (text_tool->antialias_toggle);
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -283,12 +283,19 @@ text_button_press (Tool *tool,
|
|||
{
|
||||
case RGB:
|
||||
case GRAY:
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_show (text_tool->antialias_toggle);
|
||||
if (GTK_TOGGLE_BUTTON (text_tool->antialias_toggle)->active)
|
||||
text_tool->antialias = TRUE;
|
||||
else
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
case INDEXED:
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_hide (text_tool->antialias_toggle);
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -283,12 +283,19 @@ text_button_press (Tool *tool,
|
|||
{
|
||||
case RGB:
|
||||
case GRAY:
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (!GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_show (text_tool->antialias_toggle);
|
||||
if (GTK_TOGGLE_BUTTON (text_tool->antialias_toggle)->active)
|
||||
text_tool->antialias = TRUE;
|
||||
else
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
case INDEXED:
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle))
|
||||
if (GTK_WIDGET_VISIBLE (text_tool->antialias_toggle)) {
|
||||
gtk_widget_hide (text_tool->antialias_toggle);
|
||||
text_tool->antialias = FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
1/10/98:
|
||||
|
||||
Simultaniously changed the name of the menu entry to "Refract" instead
|
||||
of "Refract&Reflect" and made changes preparing to add Reflect
|
||||
functionality. Note that this changed the PDB interface.
|
||||
|
||||
Discovered that the GParam thing didn't need to be "fixed", so I put
|
||||
it back.
|
||||
|
||||
1/2/98: refract-Beta
|
||||
|
||||
Refract is back, and better than ever! That's right... The New Layer
|
||||
|
|
|
@ -26,3 +26,6 @@ shipped with all sorts of debugging flags turned on and optimizations
|
|||
turned OFF. If you don't care why refract crashes if and when it
|
||||
does, go ahead and comment out the debug flags and uncomment the
|
||||
optimizations. Hopefully it will pick up some speed that way.
|
||||
|
||||
There are also a few options available for dinking in refract.h, but
|
||||
none too interesting at the moment.
|
||||
|
|
|
@ -114,7 +114,7 @@ go_refract( GDrawable * drawable, gint32 image_id)
|
|||
/***************************/
|
||||
/* Initialize lens region: */
|
||||
|
||||
lensmap = gimp_drawable_get (refractvals.lensmap);
|
||||
lensmap = gimp_drawable_get (refractvals.lens_id);
|
||||
|
||||
/* Fortunately, this isn't really run repeatedly, so it's OK if
|
||||
it's not all that compact, right? */
|
||||
|
@ -406,14 +406,11 @@ delta(gdouble *offset, gdouble slope, gint height)
|
|||
alpha = atan(slope);
|
||||
|
||||
if( alpha > asin( refractvals.nb / refractvals.na )) {
|
||||
#ifdef REFRACT_DEBUG
|
||||
puts("!");
|
||||
#endif
|
||||
return FALSE; /* Total Internal Refraction. Aiee! */
|
||||
}
|
||||
|
||||
beta = asin(refractvals.na * sin(alpha)/refractvals.nb);
|
||||
*offset = -(refractvals.dist + height) * tan(beta - alpha);
|
||||
*offset = -(refractvals.refr_dist + height) * tan(beta - alpha);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -95,8 +95,10 @@ GPlugInInfo PLUG_IN_INFO =
|
|||
RefractValues refractvals =
|
||||
{
|
||||
-1, /* Lens map ID */
|
||||
-1, /* Reflection source ID */
|
||||
32, /* lens thickness */
|
||||
0, /* distance */
|
||||
0, /* lens to image distance */
|
||||
64, /* lens to reflection source distance */
|
||||
1.0003, /* index a */
|
||||
1.333, /* index b */
|
||||
WRAP, /* wrap behaviour */
|
||||
|
@ -121,9 +123,11 @@ query ()
|
|||
{ PARAM_IMAGE, "image", "Input image" },
|
||||
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
|
||||
/* If we did have parameters, these be them: */
|
||||
{ PARAM_DRAWABLE, "lensmap", "Lens map drawable" },
|
||||
{ PARAM_DRAWABLE, "lens_id", "Lens map drawable" },
|
||||
{ PARAM_DRAWABLE, "refl_id", "Reflection source drawable." },
|
||||
{ PARAM_INT32, "thick", "Lens thickness" },
|
||||
{ PARAM_INT32, "dist", "Lens distance from image" },
|
||||
{ PARAM_INT32, "refr_dist", "Lens distance from image" },
|
||||
{ PARAM_INT32, "refl_dist", "Lens distance from reflection source" },
|
||||
{ PARAM_FLOAT, "na", "Index of Refraction A" },
|
||||
{ PARAM_FLOAT, "nb", "Index of Refraction B" },
|
||||
{ PARAM_INT32, "edge", "Background (0), Outside (1), Wrap (2)" },
|
||||
|
@ -164,6 +168,8 @@ run (gchar *name,
|
|||
printf("refract: pid %d\n", getpid());
|
||||
#endif
|
||||
|
||||
/* values=g_new(GParam,1); */
|
||||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
*nreturn_vals = 1;
|
||||
|
@ -188,15 +194,17 @@ run (gchar *name,
|
|||
|
||||
case RUN_NONINTERACTIVE:
|
||||
if (status == STATUS_SUCCESS) {
|
||||
refractvals.lensmap = param[3].data.d_drawable;
|
||||
refractvals.thick = param[4].data.d_int32;
|
||||
refractvals.dist = param[5].data.d_int32;
|
||||
refractvals.na = param[6].data.d_float;
|
||||
refractvals.nb = param[7].data.d_float;
|
||||
refractvals.edge = param[8].data.d_int32;
|
||||
refractvals.newl = param[9].data.d_int32;
|
||||
refractvals.xofs = param[10].data.d_int32;
|
||||
refractvals.yofs = param[11].data.d_int32;
|
||||
refractvals.lens_id = param[3].data.d_drawable;
|
||||
refractvals.refl_id = param[4].data.d_int32;
|
||||
refractvals.thick = param[5].data.d_int32;
|
||||
refractvals.refr_dist = param[6].data.d_float;
|
||||
refractvals.refl_dist = param[7].data.d_float;
|
||||
refractvals.na = param[8].data.d_int32;
|
||||
refractvals.nb = param[9].data.d_int32;
|
||||
refractvals.edge = param[10].data.d_int32;
|
||||
refractvals.newl = param[11].data.d_int32;
|
||||
refractvals.xofs = param[12].data.d_int32;
|
||||
refractvals.yofs = param[13].data.d_int32;
|
||||
} /* if */
|
||||
|
||||
break;
|
||||
|
@ -309,7 +317,7 @@ refract_dialog()
|
|||
option_menu = gtk_option_menu_new();
|
||||
|
||||
menu = gimp_drawable_menu_new(map_constrain, map_menu_callback,
|
||||
NULL, refractvals.lensmap);
|
||||
NULL, refractvals.lens_id);
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu),menu);
|
||||
gtk_tooltips_set_tips (tooltips, option_menu,
|
||||
"The drawable to use as the lens.");
|
||||
|
@ -339,7 +347,7 @@ refract_dialog()
|
|||
0, 1000,
|
||||
1, 10, 0/*what's this do?*/,
|
||||
0, 2, 2, 3,
|
||||
&refractvals.dist);
|
||||
&refractvals.refr_dist);
|
||||
|
||||
/* a entry/scale/drop-menu for each index */
|
||||
mw_fscale_entry_new(table, "Index A",
|
||||
|
@ -523,5 +531,5 @@ refract_ok_callback (GtkWidget *widget, gpointer data)
|
|||
static void
|
||||
map_menu_callback (gint32 id, gpointer data)
|
||||
{
|
||||
refractvals.lensmap = id;
|
||||
refractvals.lens_id = id;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
*/
|
||||
|
||||
#ifndef REFRACT_DEBUG
|
||||
#warning "REFRACT_DEBUG flag is Off."
|
||||
#define REFRACT_TITLE "Refract 1/2/98-Beta"
|
||||
#else
|
||||
#warning "REFRACT_DEBUG flag is On."
|
||||
#define REFRACT_TITLE "Refract 1/2/98 (debug)"
|
||||
#endif
|
||||
|
||||
|
@ -47,15 +45,17 @@
|
|||
#include "gtk/gtk.h"
|
||||
|
||||
typedef struct {
|
||||
gint32 lensmap; /* lens map id */
|
||||
gint32 thick; /* lens thickness */
|
||||
gint32 dist; /* distance */
|
||||
gdouble na; /* index a */
|
||||
gdouble nb; /* index b */
|
||||
gint edge; /* wrap/transparent */
|
||||
gint newl; /* new layer? */
|
||||
gint xofs; /* offset x */
|
||||
gint yofs; /* offset y */
|
||||
gint32 lens_id; /* lens map id */
|
||||
gint32 refl_id; /* Reflection source ID */
|
||||
gint32 thick; /* lens thickness */
|
||||
gint32 refr_dist; /* distance from lens to image. */
|
||||
gint32 refl_dist; /* Distance from lens/mirror to reflection source. */
|
||||
gdouble na; /* index a */
|
||||
gdouble nb; /* index b */
|
||||
gint32 edge; /* wrap/transparent */
|
||||
gint32 newl; /* new layer? */
|
||||
gint32 xofs; /* offset x */
|
||||
gint32 yofs; /* offset y */
|
||||
} RefractValues;
|
||||
|
||||
/* for refractvals.edge */
|
||||
|
|
1057
plug-ins/warp/warp.c
1057
plug-ins/warp/warp.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue