From ChangeLog:

* INSTALL: updated to properly reflect installation procedure

        * app/text_tool.c: Fixed bad string in tool description

        * libgimp/gimppixelrgn.c: tiles aren't marked dirty in
        gimp_pixel_rgn_get_pixel

        * plug-ins/edge/edge.c
        * plug-ins/edge/emboss.c
        * plug-ins/edge/laplace.c
        * plug-ins/edge/sobel.c: DEC OSF1 cannont handle reference to
        array element with a negative arugment with an unsigned int
        (gimp-joke-980108-0)

        * plug-ins/sinus/sinus_logo.h: got rid of really long string

        * plug-ins/refract/Makefile.am
        * plug-ins/refract/refmain.c: fixed megawidget reference

        * plug-ins/xpm/xpm.c: made our own case-insenstive strcmp
        for checking for transperancy

-Yosh
This commit is contained in:
Manish Singh 1998-01-09 09:26:28 +00:00
parent 0b8bdb4dd7
commit c871eb39a9
21 changed files with 758 additions and 60 deletions

View File

@ -1,3 +1,27 @@
Fri Jan 9 01:15:51 PST 1998 Manish Singh <yosh@gimp.org>
* INSTALL: updated to properly reflect installation procedure
* app/text_tool.c: Fixed bad string in tool description
* libgimp/gimppixelrgn.c: tiles aren't marked dirty in
gimp_pixel_rgn_get_pixel
* plug-ins/edge/edge.c
* plug-ins/edge/emboss.c
* plug-ins/edge/laplace.c
* plug-ins/edge/sobel.c: DEC OSF1 cannont handle reference to
array element with a negative arugment with an unsigned int
(gimp-joke-980108-0)
* plug-ins/sinus/sinus_logo.h: got rid of really long string
* plug-ins/refract/Makefile.am
* plug-ins/refract/refmain.c: fixed megawidget reference
* plug-ins/xpm/xpm.c: made our own case-insenstive strcmp
for checking for transperancy
Tue Jan 6 14:17:02 PST 1998 Manish Singh <yosh@gimp.org> Tue Jan 6 14:17:02 PST 1998 Manish Singh <yosh@gimp.org>
* configure.in: make it *really* check for gtk >= 0.99.1 this * configure.in: make it *really* check for gtk >= 0.99.1 this

12
INSTALL
View File

@ -1,10 +1,14 @@
There are three basic steps to building and installing the There are three basic steps to building and installing the
GIMP on unix: GIMP on unix:
1. Configure the GIMP by running the `configure' script. 1. You need to have installed GTK version 0.99.1 or better
2. Build the GIMP by running `make'. 2. You may want to install other third party libraries that
3. Install the GIMP by running `make install'. are needed for some of the available plugins: TIFF, PNG,
4. Install the gimp-data package. Be sure to install this, or you JPEG, MPEG, etc.
3. Configure the GIMP by running the `configure' script.
4. Build the GIMP by running `make'.
5. Install the GIMP by running `make install'.
6. Install the gimp-data package. Be sure to install this, or you
won't have the GIMP's datafiles installed. won't have the GIMP's datafiles installed.
Generic instructions for configuring and compiling auto-configured Generic instructions for configuring and compiling auto-configured

View File

@ -1835,11 +1835,10 @@ ProcRecord text_tool_proc =
{ {
"gimp_text", "gimp_text",
"Add text at the specified location as a floating selection or a new layer.", "Add text at the specified location as a floating selection or a new layer.",
"This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size "This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size_type "
_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layer "argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. "
s. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "
text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixel "text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.",
s.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"1995-1996", "1995-1996",

View File

@ -1835,11 +1835,10 @@ ProcRecord text_tool_proc =
{ {
"gimp_text", "gimp_text",
"Add text at the specified location as a floating selection or a new layer.", "Add text at the specified location as a floating selection or a new layer.",
"This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size "This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size_type "
_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layer "argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. "
s. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "
text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixel "text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.",
s.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"1995-1996", "1995-1996",

View File

@ -1835,11 +1835,10 @@ ProcRecord text_tool_proc =
{ {
"gimp_text", "gimp_text",
"Add text at the specified location as a floating selection or a new layer.", "Add text at the specified location as a floating selection or a new layer.",
"This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size "This tool requires font information in the form of seven parameters: {size, foundry, family, weight, slant, set_width, spacing}. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size_type "
_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layer "argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. "
s. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the "
text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixel "text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.",
s.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"1995-1996", "1995-1996",

View File

@ -113,7 +113,7 @@ gimp_pixel_rgn_get_pixel (GPixelRgn *pr,
for (b = 0; b < tile->bpp; b++) for (b = 0; b < tile->bpp; b++)
*buf++ = *tile_data++; *buf++ = *tile_data++;
gimp_tile_unref (tile, TRUE); gimp_tile_unref (tile, FALSE);
} }
void void

View File

@ -534,7 +534,7 @@ edge( GDrawable *drawable )
* *
* -- taka * -- taka
*/ */
#define PIX(X,Y) src[ (Y-1)*src_rgn.rowstride + (X-1)*src_rgn.bpp + chan ] #define PIX(X,Y) src[ (Y-1)*(int)src_rgn.rowstride + (X-1)*(int)src_rgn.bpp + chan ]
/* make convolusion */ /* make convolusion */
sum1 = ( PIX(2,0) - PIX(0,0) ) + sum1 = ( PIX(2,0) - PIX(0,0) ) +
2 * ( PIX(2,1) - PIX(0,1) ) + 2 * ( PIX(2,1) - PIX(0,1) ) +

View File

@ -269,9 +269,9 @@ EmbossRow(guchar *src, guchar *texture, guchar *dst,
* some cases the sum is unsigned, in others it is * some cases the sum is unsigned, in others it is
* signed. ergo, cast to signed. * signed. ergo, cast to signed.
*/ */
Nx = (int)(s1[-bypp] + s2[-bypp] + s3[-bypp] Nx = (int)(s1[-(int)bypp] + s2[-(int)bypp] + s3[-(int)bypp]
- s1[bypp] - s2[bypp] - s3[bypp]); - s1[bypp] - s2[bypp] - s3[bypp]);
Ny = (int)(s3[-bypp] + s3[0] + s3[bypp] - s1[-bypp] Ny = (int)(s3[-(int)bypp] + s3[0] + s3[bypp] - s1[-(int)bypp]
- s1[0] - s1[bypp]); - s1[0] - s1[bypp]);
/* shade with distant light source */ /* shade with distant light source */

View File

@ -147,7 +147,7 @@ laplace_prepare_row (GPixelRgn *pixel_rgn,
/* Fill in edge pixels */ /* Fill in edge pixels */
for (b = 0; b < pixel_rgn->bpp; b++) for (b = 0; b < pixel_rgn->bpp; b++)
{ {
data[-pixel_rgn->bpp + b] = data[b]; data[-(int)pixel_rgn->bpp + b] = data[b];
data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b]; data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b];
} }
} }

View File

@ -341,7 +341,7 @@ sobel_prepare_row (GPixelRgn *pixel_rgn,
/* Fill in edge pixels */ /* Fill in edge pixels */
for (b = 0; b < pixel_rgn->bpp; b++) for (b = 0; b < pixel_rgn->bpp; b++)
{ {
data[-pixel_rgn->bpp + b] = data[b]; data[-(int)pixel_rgn->bpp + b] = data[b];
data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b]; data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b];
} }
} }

View File

@ -60,6 +60,9 @@ static void run (char *name,
static gint32 static gint32
load_image (char *filename); load_image (char *filename);
static int
cmp_icase (char *s1, char *s2);
static void static void
parse_colors (XpmImage *xpm_image, parse_colors (XpmImage *xpm_image,
guchar **cmap); guchar **cmap);
@ -309,6 +312,24 @@ load_image (char *filename)
static int
cmp_icase (char *s1, char *s2)
{
register int c1, c2;
while (*s1 && *s2)
{
c1 = tolower(*s1++); c2 = tolower(*s2++);
if (c1 != c2)
return (c1 - c2);
}
return (int) (*s1 - *s2);
}
static void static void
parse_colors (XpmImage *xpm_image, guchar **cmap) parse_colors (XpmImage *xpm_image, guchar **cmap)
{ {
@ -348,12 +369,9 @@ parse_colors (XpmImage *xpm_image, guchar **cmap)
else if (xpm_color->m_color) else if (xpm_color->m_color)
colorspec = xpm_color->m_color; colorspec = xpm_color->m_color;
if (strcmp(colorspec, "none") == 0)
colorspec = "None";
/* parse if it's not transparent. the assumption is that /* parse if it's not transparent. the assumption is that
g_new will memset the buffer to zeros */ g_new will memset the buffer to zeros */
if (strcmp(colorspec, "None") != 0) { if (cmp_icase(colorspec, "None") != 0) {
XParseColor (display, colormap, colorspec, &xcolor); XParseColor (display, colormap, colorspec, &xcolor);
(*cmap)[j++] = xcolor.red >> 8; (*cmap)[j++] = xcolor.red >> 8;
(*cmap)[j++] = xcolor.green >> 8; (*cmap)[j++] = xcolor.green >> 8;

View File

@ -534,7 +534,7 @@ edge( GDrawable *drawable )
* *
* -- taka * -- taka
*/ */
#define PIX(X,Y) src[ (Y-1)*src_rgn.rowstride + (X-1)*src_rgn.bpp + chan ] #define PIX(X,Y) src[ (Y-1)*(int)src_rgn.rowstride + (X-1)*(int)src_rgn.bpp + chan ]
/* make convolusion */ /* make convolusion */
sum1 = ( PIX(2,0) - PIX(0,0) ) + sum1 = ( PIX(2,0) - PIX(0,0) ) +
2 * ( PIX(2,1) - PIX(0,1) ) + 2 * ( PIX(2,1) - PIX(0,1) ) +

View File

@ -269,9 +269,9 @@ EmbossRow(guchar *src, guchar *texture, guchar *dst,
* some cases the sum is unsigned, in others it is * some cases the sum is unsigned, in others it is
* signed. ergo, cast to signed. * signed. ergo, cast to signed.
*/ */
Nx = (int)(s1[-bypp] + s2[-bypp] + s3[-bypp] Nx = (int)(s1[-(int)bypp] + s2[-(int)bypp] + s3[-(int)bypp]
- s1[bypp] - s2[bypp] - s3[bypp]); - s1[bypp] - s2[bypp] - s3[bypp]);
Ny = (int)(s3[-bypp] + s3[0] + s3[bypp] - s1[-bypp] Ny = (int)(s3[-(int)bypp] + s3[0] + s3[bypp] - s1[-(int)bypp]
- s1[0] - s1[bypp]); - s1[0] - s1[bypp]);
/* shade with distant light source */ /* shade with distant light source */

View File

@ -147,7 +147,7 @@ laplace_prepare_row (GPixelRgn *pixel_rgn,
/* Fill in edge pixels */ /* Fill in edge pixels */
for (b = 0; b < pixel_rgn->bpp; b++) for (b = 0; b < pixel_rgn->bpp; b++)
{ {
data[-pixel_rgn->bpp + b] = data[b]; data[-(int)pixel_rgn->bpp + b] = data[b];
data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b]; data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b];
} }
} }

View File

@ -24,7 +24,7 @@ LDADD = \
DEPS = \ DEPS = \
$(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimpui.la \
$(top_srcdir)/plug-ins/megawidget/libmegawidget.a \ $(top_builddir)/plug-ins/megawidget/libmegawidget.a \
$(top_builddir)/libgimp/libgimp.la $(top_builddir)/libgimp/libgimp.la
refract_DEPENDENCIES = $(DEPS) refract_DEPENDENCIES = $(DEPS)

27
plug-ins/refract/TODO Normal file
View File

@ -0,0 +1,27 @@
TO DO:
code:
Do The Right Thing with respect to row buffers, macros, and inline functions.
Have the plug-in return the ID of the new layer, if it created one.
UI:
megawidgets are insufficient. (No way to integrate entry_scale
with tooltips or option_menu). Replace them.
necessary luxuries:
Add radio buttons for edge wrapping options.
nicities:
Find why two undo steps are required to undo.
Find a way to reduce the speckling.
excess luxuries:
Variable IOR information in some [alpha?] channel.
for version 1.1:
THIS PLUGIN NEEDS A PREVIEW THING!
Reflections
for version > 1.1:
Diffraction or whatever that thing that makes rainbows is called.
Lighting

View File

@ -43,7 +43,7 @@
/* megawidget.h could be in any of several places relative to us... */ /* megawidget.h could be in any of several places relative to us... */
/* should this be an autoconf thing? */ /* should this be an autoconf thing? */
#ifdef HAVE_CONFIG_H /* We're part of the GIMP distribution. */ #ifdef HAVE_CONFIG_H /* We're part of the GIMP distribution. */
#include "../megawidget/megawidget.h" #include <plug-ins/megawidget/megawidget.h>
#else #else
#include "megawidget.h" #include "megawidget.h"
/* #include <megawidget.h> */ /* #include <megawidget.h> */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -341,7 +341,7 @@ sobel_prepare_row (GPixelRgn *pixel_rgn,
/* Fill in edge pixels */ /* Fill in edge pixels */
for (b = 0; b < pixel_rgn->bpp; b++) for (b = 0; b < pixel_rgn->bpp; b++)
{ {
data[-pixel_rgn->bpp + b] = data[b]; data[-(int)pixel_rgn->bpp + b] = data[b];
data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b]; data[w * pixel_rgn->bpp + b] = data[(w - 1) * pixel_rgn->bpp + b];
} }
} }

View File

@ -60,6 +60,9 @@ static void run (char *name,
static gint32 static gint32
load_image (char *filename); load_image (char *filename);
static int
cmp_icase (char *s1, char *s2);
static void static void
parse_colors (XpmImage *xpm_image, parse_colors (XpmImage *xpm_image,
guchar **cmap); guchar **cmap);
@ -309,6 +312,24 @@ load_image (char *filename)
static int
cmp_icase (char *s1, char *s2)
{
register int c1, c2;
while (*s1 && *s2)
{
c1 = tolower(*s1++); c2 = tolower(*s2++);
if (c1 != c2)
return (c1 - c2);
}
return (int) (*s1 - *s2);
}
static void static void
parse_colors (XpmImage *xpm_image, guchar **cmap) parse_colors (XpmImage *xpm_image, guchar **cmap)
{ {
@ -348,12 +369,9 @@ parse_colors (XpmImage *xpm_image, guchar **cmap)
else if (xpm_color->m_color) else if (xpm_color->m_color)
colorspec = xpm_color->m_color; colorspec = xpm_color->m_color;
if (strcmp(colorspec, "none") == 0)
colorspec = "None";
/* parse if it's not transparent. the assumption is that /* parse if it's not transparent. the assumption is that
g_new will memset the buffer to zeros */ g_new will memset the buffer to zeros */
if (strcmp(colorspec, "None") != 0) { if (cmp_icase(colorspec, "None") != 0) {
XParseColor (display, colormap, colorspec, &xcolor); XParseColor (display, colormap, colorspec, &xcolor);
(*cmap)[j++] = xcolor.red >> 8; (*cmap)[j++] = xcolor.red >> 8;
(*cmap)[j++] = xcolor.green >> 8; (*cmap)[j++] = xcolor.green >> 8;