mirror of https://github.com/GNOME/gimp.git
removed gimp_plug_in_get_path.
2003-12-14 Sven Neumann <sven@gimp.org> * libgimp/gimpui.def: removed gimp_plug_in_get_path. * plug-ins/Lighting/lighting_apply.c * plug-ins/Lighting/lighting_preview.[ch]: minor cleanup.
This commit is contained in:
parent
aa4c77b6ad
commit
23ddba32ce
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,10 @@
|
|||
2003-12-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpui.def: removed gimp_plug_in_get_path.
|
||||
|
||||
* plug-ins/Lighting/lighting_apply.c
|
||||
* plug-ins/Lighting/lighting_preview.[ch]: minor cleanup.
|
||||
|
||||
2003-12-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpthumb/gimpthumb-error.c
|
||||
|
@ -71,30 +78,31 @@
|
|||
usage, so The Gimp should now build with msvc without patching it.
|
||||
]
|
||||
|
||||
* app/makefile.msc app/text/makefile.msc : use $(PANGOFT2_CFLAGS) etc.
|
||||
* app/makefile.msc app/text/makefile.msc: use $(PANGOFT2_CFLAGS) etc.
|
||||
|
||||
* libgimpthumb/makefile.msc : (new file)
|
||||
* makefile.msc : added libgimpthumb
|
||||
* libgimpthumb/makefile.msc: (new file)
|
||||
* makefile.msc: added libgimpthumb
|
||||
|
||||
* libgimpthumb/gimpthumbnail.c : include gimpwin32-io.h
|
||||
* libgimpthumb/gimpthumb-utils.c : don't compare size pointer
|
||||
* libgimpthumb/gimpthumbnail.c: include gimpwin32-io.h
|
||||
* libgimpthumb/gimpthumb-utils.c: don't compare size pointer
|
||||
with GIMP_THUMB_SIZE_FAIL but *size
|
||||
|
||||
* plug-ins/makefile.msc : handle libgimpoldpreview
|
||||
* plug-ins/makefile.msc: handle libgimpoldpreview
|
||||
|
||||
* plug-ins/common/decompose.c : define cbrt() if not __GLIBC__
|
||||
* plug-ins/common/decompose.c: define cbrt() if not __GLIBC__
|
||||
|
||||
* plug-ins/common/winclipboard.c : make it compile without gimpcompat.h
|
||||
* plug-ins/common/winclipboard.c: make it compile without gimpcompat.h
|
||||
|
||||
* plug-ins/imagemap/imagemap_csim_lex.c : its a generated file
|
||||
* plug-ins/imagemap/imagemap_csim_lex.c: its a generated file
|
||||
but still win32/msvc has no unistd.h
|
||||
|
||||
* plug-ins/pygimp/makefile.msc : (new file) to use the binary you
|
||||
* plug-ins/pygimp/makefile.msc: (new file) to use the binary you
|
||||
need to patch glib, see bug #98737
|
||||
|
||||
* plug-ins/libgimpoldpreview.c : use <libgimp/gimp.h> instead of "gimp.h"
|
||||
* plug-ins/libgimpoldpreview.c: use <libgimp/gimp.h> instead of
|
||||
"gimp.h"
|
||||
|
||||
* **/Makefile.am : added makefile.msc to EXTRA_DIST
|
||||
* **/Makefile.am: added makefile.msc to EXTRA_DIST
|
||||
|
||||
2003-12-12 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
|
|
|
@ -16,5 +16,4 @@ EXPORTS
|
|||
gimp_pattern_select_widget_close
|
||||
gimp_pattern_select_widget_new
|
||||
gimp_pattern_select_widget_set
|
||||
gimp_plug_in_get_path
|
||||
gimp_ui_init
|
||||
|
|
|
@ -14,42 +14,12 @@
|
|||
#include "lighting_image.h"
|
||||
#include "lighting_shade.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/*************/
|
||||
/* Main loop */
|
||||
/*************/
|
||||
|
||||
get_ray_func ray_func;
|
||||
|
||||
void
|
||||
init_compute (void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
static void
|
||||
render (gdouble x,
|
||||
gdouble y,
|
||||
GimpRGB *col)
|
||||
{
|
||||
GimpVector3 pos;
|
||||
|
||||
pos=int_to_pos(x,y);
|
||||
|
||||
*col=(*ray_func)(&pos);
|
||||
}
|
||||
|
||||
static void
|
||||
show_progress (gint min,
|
||||
gint max,
|
||||
gint curr)
|
||||
{
|
||||
gimp_progress_update ((gdouble)curr / (gdouble)max);
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
compute_image (void)
|
||||
{
|
||||
|
@ -62,10 +32,10 @@ compute_image (void)
|
|||
gint32 index;
|
||||
guchar *row = NULL;
|
||||
guchar obpp;
|
||||
gboolean has_alpha;
|
||||
get_ray_func ray_func;
|
||||
|
||||
gint has_alpha;
|
||||
|
||||
init_compute ();
|
||||
|
||||
if (mapvals.create_new_image == TRUE ||
|
||||
(mapvals.transparent_background == TRUE &&
|
||||
|
@ -164,11 +134,6 @@ compute_image (void)
|
|||
gimp_pixel_rgn_set_row (&dest_region, row, 0, ycount, width);
|
||||
}
|
||||
|
||||
/* }
|
||||
else
|
||||
gck_adaptive_supersample_area(0,0,width-1,height-1,(gint)mapvals.max_depth,
|
||||
mapvals.pixel_treshold,render,poke,show_progress); */
|
||||
|
||||
g_free (row);
|
||||
|
||||
/* Update image */
|
||||
|
|
|
@ -31,8 +31,8 @@ gdouble *ypostab = NULL;
|
|||
static gint xpostab_size = -1; /* if preview size change, do realloc */
|
||||
static gint ypostab_size = -1;
|
||||
|
||||
guint light_hit = FALSE;
|
||||
guint left_button_pressed = FALSE;
|
||||
gboolean light_hit = FALSE;
|
||||
gboolean left_button_pressed = FALSE;
|
||||
GtkWidget * spin_pos_x = NULL;
|
||||
GtkWidget * spin_pos_y = NULL;
|
||||
GtkWidget * spin_pos_z = NULL;
|
||||
|
@ -93,7 +93,6 @@ compute_preview (gint startx, gint starty, gint w, gint h)
|
|||
for (ycnt = 0; ycnt < h; ycnt++)
|
||||
ypostab[ycnt] = (gdouble) height *((gdouble) ycnt / (gdouble) h);
|
||||
|
||||
init_compute ();
|
||||
precompute_init (width, height);
|
||||
|
||||
gimp_rgba_set (&lightcheck,
|
||||
|
@ -146,10 +145,8 @@ compute_preview (gint startx, gint starty, gint w, gint h)
|
|||
mapvals.bumpmap_id != -1 &&
|
||||
xcnt == startx)
|
||||
{
|
||||
pos_to_float (pos.x, pos.y, &imagex,
|
||||
&imagey);
|
||||
precompute_normals (0, width,
|
||||
RINT (imagey));
|
||||
pos_to_float (pos.x, pos.y, &imagex, &imagey);
|
||||
precompute_normals (0, width, RINT (imagey));
|
||||
}
|
||||
|
||||
color = (*ray_func) (&pos);
|
||||
|
@ -165,8 +162,7 @@ compute_preview (gint startx, gint starty, gint w, gint h)
|
|||
if (color.a == 0.0)
|
||||
color = lightcheck;
|
||||
else
|
||||
gimp_rgb_composite
|
||||
(&color,
|
||||
gimp_rgb_composite (&color,
|
||||
&lightcheck,
|
||||
GIMP_RGB_COMPOSITE_BEHIND);
|
||||
}
|
||||
|
@ -175,8 +171,7 @@ compute_preview (gint startx, gint starty, gint w, gint h)
|
|||
if (color.a == 0.0)
|
||||
color = darkcheck;
|
||||
else
|
||||
gimp_rgb_composite
|
||||
(&color,
|
||||
gimp_rgb_composite (&color,
|
||||
&darkcheck,
|
||||
GIMP_RGB_COMPOSITE_BEHIND);
|
||||
}
|
||||
|
@ -384,19 +379,19 @@ draw_handles ()
|
|||
{
|
||||
case POINT_LIGHT:
|
||||
case SPOT_LIGHT:
|
||||
gdk_draw_arc ( previewarea->window, gc, TRUE,
|
||||
gdk_draw_arc (previewarea->window, gc, TRUE,
|
||||
handle_xpos - LIGHT_SYMBOL_SIZE / 2,
|
||||
handle_ypos - LIGHT_SYMBOL_SIZE / 2,
|
||||
LIGHT_SYMBOL_SIZE,
|
||||
LIGHT_SYMBOL_SIZE, 0, 360 * 64);
|
||||
break;
|
||||
case DIRECTIONAL_LIGHT:
|
||||
gdk_draw_arc ( previewarea->window, gc, TRUE,
|
||||
gdk_draw_arc (previewarea->window, gc, TRUE,
|
||||
handle_xpos - LIGHT_SYMBOL_SIZE / 2,
|
||||
handle_ypos - LIGHT_SYMBOL_SIZE / 2,
|
||||
LIGHT_SYMBOL_SIZE,
|
||||
LIGHT_SYMBOL_SIZE, 0, 360 * 64);
|
||||
gdk_draw_line( previewarea->window, gc,
|
||||
gdk_draw_line (previewarea->window, gc,
|
||||
handle_xpos, handle_ypos, startx+pw/2 , starty + ph/2);
|
||||
break;
|
||||
case NO_LIGHT:
|
||||
|
@ -448,7 +443,7 @@ update_light (gint xpos, gint ypos)
|
|||
/******************************************************************/
|
||||
|
||||
void
|
||||
draw_preview_image (gint recompute)
|
||||
draw_preview_image (gboolean recompute)
|
||||
{
|
||||
gint startx, starty, pw, ph;
|
||||
|
||||
|
@ -458,7 +453,7 @@ draw_preview_image (gint recompute)
|
|||
|
||||
compute_preview_rectangle (&startx, &starty, &pw, &ph);
|
||||
|
||||
if (recompute == TRUE)
|
||||
if (recompute)
|
||||
{
|
||||
GdkDisplay *display = gtk_widget_get_display (previewarea);
|
||||
GdkCursor *cursor;
|
||||
|
@ -473,6 +468,7 @@ draw_preview_image (gint recompute)
|
|||
gdk_window_set_cursor (previewarea->window, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
gdk_flush ();
|
||||
|
||||
/* if we recompute, clear backbuf, so we don't
|
||||
* restore the wrong bitmap */
|
||||
if (backbuf.image != NULL)
|
||||
|
@ -496,7 +492,7 @@ draw_preview_image (gint recompute)
|
|||
/* Preview area event handler */
|
||||
/******************************/
|
||||
|
||||
gint
|
||||
gboolean
|
||||
preview_events (GtkWidget *area,
|
||||
GdkEvent *event)
|
||||
{
|
||||
|
@ -550,18 +546,25 @@ interactive_preview_callback (GtkWidget *widget)
|
|||
g_source_remove ( preview_update_timer );
|
||||
}
|
||||
/* start new timer */
|
||||
preview_update_timer = g_timeout_add(100, interactive_preview_timer_callback, NULL);
|
||||
preview_update_timer = g_timeout_add (100,
|
||||
interactive_preview_timer_callback, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interactive_preview_timer_callback ( gpointer data )
|
||||
{
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_pos_x), mapvals.lightsource.position.x);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_pos_y), mapvals.lightsource.position.y);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_pos_z), mapvals.lightsource.position.z);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_dir_x), mapvals.lightsource.direction.x);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_dir_y), mapvals.lightsource.direction.y);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_dir_z), mapvals.lightsource.direction.z);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_pos_x),
|
||||
mapvals.lightsource.position.x);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_pos_y),
|
||||
mapvals.lightsource.position.y);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_pos_z),
|
||||
mapvals.lightsource.position.z);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_dir_x),
|
||||
mapvals.lightsource.direction.x);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_dir_y),
|
||||
mapvals.lightsource.direction.y);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin_dir_z),
|
||||
mapvals.lightsource.direction.z);
|
||||
|
||||
draw_preview_image (TRUE);
|
||||
|
||||
|
|
|
@ -32,27 +32,21 @@ typedef struct
|
|||
extern gint lightx, lighty;
|
||||
extern BackBuffer backbuf;
|
||||
extern gdouble *xpostab, *ypostab;
|
||||
extern guint light_hit;
|
||||
extern guint left_button_pressed;
|
||||
extern GtkWidget * spin_pos_x;
|
||||
extern GtkWidget * spin_pos_y;
|
||||
extern GtkWidget * spin_pos_z;
|
||||
extern GtkWidget * spin_dir_x;
|
||||
extern GtkWidget * spin_dir_y;
|
||||
extern GtkWidget * spin_dir_z;
|
||||
extern gboolean light_hit;
|
||||
extern gboolean left_button_pressed;
|
||||
extern GtkWidget *spin_pos_x;
|
||||
extern GtkWidget *spin_pos_y;
|
||||
extern GtkWidget *spin_pos_z;
|
||||
extern GtkWidget *spin_dir_x;
|
||||
extern GtkWidget *spin_dir_y;
|
||||
extern GtkWidget *spin_dir_z;
|
||||
|
||||
/* Externally visible functions */
|
||||
|
||||
void draw_preview_image (gint recompute);
|
||||
|
||||
void draw_preview_image (gboolean recompute);
|
||||
void interactive_preview_callback (GtkWidget *widget);
|
||||
|
||||
gint preview_events (GtkWidget *area,
|
||||
gboolean preview_events (GtkWidget *area,
|
||||
GdkEvent *event);
|
||||
|
||||
|
||||
gint check_marker_hit (gint xpos,
|
||||
gint ypos);
|
||||
void update_light (gint xpos,
|
||||
gint ypos);
|
||||
|
||||
|
|
Loading…
Reference in New Issue