mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 22:25:48 +01:00
Code update for Window Maker version 0.50.0
Read changes in ChangeLog and NEWS
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
lib_LIBRARIES = libwraster.a
|
||||
lib_LTLIBRARIES = libwraster.la
|
||||
|
||||
libwraster_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
noinst_PROGRAMS = test testgrad testdraw view
|
||||
|
||||
@@ -10,7 +12,7 @@ EXTRA_DIST = test.png tile.xpm ballot_box.xpm ballot_box.tiff
|
||||
|
||||
include_HEADERS = wraster.h
|
||||
|
||||
libwraster_a_SOURCES = \
|
||||
libwraster_la_SOURCES = \
|
||||
raster.c \
|
||||
draw.c \
|
||||
color.c \
|
||||
@@ -35,7 +37,7 @@ libwraster_a_SOURCES = \
|
||||
|
||||
INCLUDES = @DFLAGS@ @XCFLAGS@ @GFXFLAGS@ @XSHM@
|
||||
|
||||
LIBLIST = -L. -lwraster @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
|
||||
LIBLIST = libwraster.la @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
|
||||
|
||||
view_SOURCES= view.c
|
||||
|
||||
@@ -54,6 +56,6 @@ testdraw_SOURCES = testdraw.c
|
||||
testdraw_LDADD = $(LIBLIST)
|
||||
|
||||
|
||||
libwraster_a_LIBADD = @ALLOCA@
|
||||
libwraster_la_LIBADD = @ALLOCA@
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -92,7 +95,9 @@ wprefsdir = @wprefsdir@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
lib_LIBRARIES = libwraster.a
|
||||
lib_LTLIBRARIES = libwraster.la
|
||||
|
||||
libwraster_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
noinst_PROGRAMS = test testgrad testdraw view
|
||||
|
||||
@@ -100,7 +105,7 @@ EXTRA_DIST = test.png tile.xpm ballot_box.xpm ballot_box.tiff
|
||||
|
||||
include_HEADERS = wraster.h
|
||||
|
||||
libwraster_a_SOURCES = \
|
||||
libwraster_la_SOURCES = \
|
||||
raster.c \
|
||||
draw.c \
|
||||
color.c \
|
||||
@@ -124,7 +129,7 @@ libwraster_a_SOURCES = \
|
||||
|
||||
INCLUDES = @DFLAGS@ @XCFLAGS@ @GFXFLAGS@ @XSHM@
|
||||
|
||||
LIBLIST = -L. -lwraster @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
|
||||
LIBLIST = libwraster.la @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ -lm
|
||||
|
||||
view_SOURCES= view.c
|
||||
|
||||
@@ -142,11 +147,11 @@ testdraw_SOURCES = testdraw.c
|
||||
|
||||
testdraw_LDADD = $(LIBLIST)
|
||||
|
||||
libwraster_a_LIBADD = @ALLOCA@
|
||||
libwraster_la_LIBADD = @ALLOCA@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I../src
|
||||
@@ -156,28 +161,29 @@ LIBS = @LIBS@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
libwraster_a_DEPENDENCIES = @ALLOCA@
|
||||
libwraster_a_OBJECTS = raster.o draw.o color.o load.o save.o gradient.o \
|
||||
xpixmap.o convert.o context.o misc.o scale.o convolve.o nxpm.o xpm.o \
|
||||
xutil.o ppm.o png.o jpeg.o tiff.o gif.o
|
||||
AR = ar
|
||||
libwraster_la_DEPENDENCIES = @ALLOCA@
|
||||
libwraster_la_OBJECTS = raster.lo draw.lo color.lo load.lo save.lo \
|
||||
gradient.lo xpixmap.lo convert.lo context.lo misc.lo scale.lo \
|
||||
convolve.lo nxpm.lo xpm.lo xutil.lo ppm.lo png.lo jpeg.lo tiff.lo \
|
||||
gif.lo
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
|
||||
test_OBJECTS = test.o
|
||||
test_DEPENDENCIES =
|
||||
test_DEPENDENCIES = libwraster.la
|
||||
test_LDFLAGS =
|
||||
testgrad_OBJECTS = testgrad.o
|
||||
testgrad_DEPENDENCIES =
|
||||
testgrad_DEPENDENCIES = libwraster.la
|
||||
testgrad_LDFLAGS =
|
||||
testdraw_OBJECTS = testdraw.o
|
||||
testdraw_DEPENDENCIES =
|
||||
testdraw_DEPENDENCIES = libwraster.la
|
||||
testdraw_LDFLAGS =
|
||||
view_OBJECTS = view.o
|
||||
view_DEPENDENCIES =
|
||||
view_DEPENDENCIES = libwraster.la
|
||||
view_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
|
||||
@@ -188,13 +194,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(libwraster_a_SOURCES) $(test_SOURCES) $(testgrad_SOURCES) $(testdraw_SOURCES) $(view_SOURCES)
|
||||
OBJECTS = $(libwraster_a_OBJECTS) $(test_OBJECTS) $(testgrad_OBJECTS) $(testdraw_OBJECTS) $(view_OBJECTS)
|
||||
SOURCES = $(libwraster_la_SOURCES) $(test_SOURCES) $(testgrad_SOURCES) $(testdraw_SOURCES) $(view_SOURCES)
|
||||
OBJECTS = $(libwraster_la_OBJECTS) $(test_OBJECTS) $(testgrad_OBJECTS) $(testdraw_OBJECTS) $(view_OBJECTS)
|
||||
|
||||
all: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
all: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu wrlib/Makefile
|
||||
|
||||
@@ -203,36 +209,29 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLIBRARIES:
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLIBRARIES:
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLIBRARIES:
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/$$p; \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
@@ -254,10 +253,27 @@ distclean-compile:
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
libwraster.a: $(libwraster_a_OBJECTS) $(libwraster_a_DEPENDENCIES)
|
||||
-rm -f libwraster.a
|
||||
$(AR) cru libwraster.a $(libwraster_a_OBJECTS) $(libwraster_a_LIBADD)
|
||||
$(RANLIB) libwraster.a
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libwraster.la: $(libwraster_la_OBJECTS) $(libwraster_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libwraster_la_LDFLAGS) $(libwraster_la_OBJECTS) $(libwraster_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-noinstPROGRAMS:
|
||||
|
||||
@@ -340,7 +356,7 @@ dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec: install-libLIBRARIES
|
||||
install-exec: install-libLTLIBRARIES
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-includeHEADERS
|
||||
@@ -349,7 +365,7 @@ install-data: install-includeHEADERS
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-libLIBRARIES uninstall-includeHEADERS
|
||||
uninstall: uninstall-libLTLIBRARIES uninstall-includeHEADERS
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
@@ -371,29 +387,33 @@ distclean-generic:
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-libLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-noinstPROGRAMS mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
mostlyclean: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-noinstPROGRAMS \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-libLIBRARIES clean-compile clean-noinstPROGRAMS clean-tags \
|
||||
clean-generic mostlyclean
|
||||
clean: clean-libLTLIBRARIES clean-compile clean-libtool \
|
||||
clean-noinstPROGRAMS clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-libLIBRARIES distclean-compile \
|
||||
distclean: distclean-libLTLIBRARIES distclean-compile distclean-libtool \
|
||||
distclean-noinstPROGRAMS distclean-tags \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-libLIBRARIES \
|
||||
maintainer-clean-compile \
|
||||
maintainer-clean: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
|
||||
clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
|
||||
install-libLIBRARIES mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile mostlyclean-noinstPROGRAMS \
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
|
||||
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
|
||||
maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \
|
||||
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
|
||||
|
||||
@@ -57,7 +57,7 @@ allocatePseudoColor(RContext *ctx)
|
||||
int i, ncolors, r, g, b;
|
||||
int retries;
|
||||
int cpc = ctx->attribs->colors_per_channel;
|
||||
|
||||
|
||||
ncolors = cpc * cpc * cpc;
|
||||
|
||||
if ( ncolors > (1<<ctx->depth) ) {
|
||||
@@ -337,6 +337,7 @@ getColormap(RContext *context, int screen_number)
|
||||
&cmaps, &ncmaps, XA_RGB_DEFAULT_MAP)) {
|
||||
for (i=0; i<ncmaps; ++i) {
|
||||
if (cmaps[i].visualid == context->visual->visualid) {
|
||||
puts("ACHOU");
|
||||
cmap = cmaps[i].colormap;
|
||||
break;
|
||||
}
|
||||
@@ -531,7 +532,8 @@ bestContext(Display *dpy, int screen_number, RContext *context)
|
||||
else if (vinfo[i].depth>24 && best<0) best = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (best == -1) { /* look for a DirectColor, 24-bit or more (pref 24) */
|
||||
rvinfo.class = DirectColor;
|
||||
if (vinfo) XFree((char *) vinfo);
|
||||
@@ -543,6 +545,7 @@ bestContext(Display *dpy, int screen_number, RContext *context)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (best > -1) {
|
||||
context->visual = vinfo[best].visual;
|
||||
context->depth = vinfo[best].depth;
|
||||
|
||||
@@ -49,8 +49,8 @@ char *alloca ();
|
||||
*----------------------------------------------------------------------
|
||||
* RBlurImage--
|
||||
* Apply 3x3 1 1 1 low pass, convolution mask to image.
|
||||
* 1 1 1
|
||||
* 1 1 1 /9
|
||||
* 1 2 1
|
||||
* 1 1 1 /10
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
@@ -61,8 +61,8 @@ RBlurImage(RImage *image)
|
||||
unsigned char *r, *g, *b, *a;
|
||||
unsigned char *pr=NULL, *pg=NULL, *pb=NULL, *pa=NULL;
|
||||
|
||||
#define MASK(c,pc,p) ((*c + *(c-1) + *(c+1) + pc[p] + pc[p-1] + pc[p+1] \
|
||||
+ *(c+w) + *(c+w-1) + *(c+w+1))/9)
|
||||
#define MASK(c,pc,p) ((*c+ *c + *(c-1) + *(c+1) + pc[p] + pc[p-1] + pc[p+1] \
|
||||
+ *(c+w) + *(c+w-1) + *(c+w+1))/10)
|
||||
|
||||
pr = (unsigned char*)alloca(image->width*sizeof(char));
|
||||
if (!pr)
|
||||
@@ -138,10 +138,6 @@ RBlurImage(RImage *image)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
int
|
||||
REdgeDetectImage(RImage *image)
|
||||
|
||||
11
wrlib/jpeg.c
11
wrlib/jpeg.c
@@ -137,13 +137,6 @@ RLoadJPEG(RContext *context, char *file_name, int index)
|
||||
goto bye;
|
||||
}
|
||||
|
||||
image = RCreateImage(cinfo.image_width, cinfo.image_height, False);
|
||||
if (!image) {
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
goto bye;
|
||||
}
|
||||
|
||||
|
||||
if(cinfo.jpeg_color_space==JCS_GRAYSCALE) {
|
||||
cinfo.out_color_space=JCS_GRAYSCALE;
|
||||
} else
|
||||
@@ -175,9 +168,9 @@ RLoadJPEG(RContext *context, char *file_name, int index)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
jpeg_finish_decompress(&cinfo);
|
||||
*/
|
||||
|
||||
bye:
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
|
||||
33
wrlib/nxpm.c
33
wrlib/nxpm.c
@@ -415,7 +415,7 @@ typedef struct XPMColor {
|
||||
unsigned char red;
|
||||
unsigned char green;
|
||||
unsigned char blue;
|
||||
char text[12];
|
||||
int index;
|
||||
struct XPMColor *next;
|
||||
} XPMColor;
|
||||
|
||||
@@ -482,23 +482,35 @@ addcolor(XPMColor **list, unsigned r, unsigned g, unsigned b, int *colors)
|
||||
}
|
||||
|
||||
|
||||
static char*
|
||||
index2str(char *buffer, int index, int colorCount)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<colorCount/64+1; i++) {
|
||||
buffer[i] = I2CHAR(index&63);
|
||||
index >>= 5;
|
||||
}
|
||||
buffer[i] = 0;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
outputcolormap(FILE *file, XPMColor *colormap, int colorCount)
|
||||
{
|
||||
int j;
|
||||
int i,index;
|
||||
char buf[128];
|
||||
|
||||
if (!colormap)
|
||||
return;
|
||||
|
||||
for (index=0; colormap!=NULL; colormap=colormap->next,index++) {
|
||||
j = index;
|
||||
for (i=0; i<colorCount/64+1; i++) {
|
||||
colormap->text[i] = I2CHAR(j&63);
|
||||
j >>= 5;
|
||||
}
|
||||
colormap->text[i] = 0;
|
||||
fprintf(file, "\"%s c #%02x%02x%02x\",\n", colormap->text, colormap->red,
|
||||
colormap->index = index;
|
||||
fprintf(file, "\"%s c #%02x%02x%02x\",\n",
|
||||
index2str(buf, index, colorCount), colormap->red,
|
||||
colormap->green, colormap->blue);
|
||||
}
|
||||
}
|
||||
@@ -531,6 +543,7 @@ RSaveXPM(RImage *image, char *filename)
|
||||
int ok = 0;
|
||||
unsigned char *r, *g, *b, *a;
|
||||
char transp[16];
|
||||
char buf[128];
|
||||
|
||||
file = fopen(filename, "w+");
|
||||
if (!file) {
|
||||
@@ -564,7 +577,6 @@ RSaveXPM(RImage *image, char *filename)
|
||||
fprintf(file, "\"%i %i %i %i\",\n", image->width, image->height,
|
||||
colorCount, colorCount/64+1);
|
||||
|
||||
|
||||
/* write colormap data */
|
||||
if (image->data[3]) {
|
||||
for (i=0; i<colorCount/64+1; i++)
|
||||
@@ -582,6 +594,7 @@ RSaveXPM(RImage *image, char *filename)
|
||||
b = image->data[2];
|
||||
a = image->data[3];
|
||||
|
||||
|
||||
/* write data */
|
||||
for (y = 0; y < image->height; y++) {
|
||||
|
||||
@@ -592,7 +605,7 @@ RSaveXPM(RImage *image, char *filename)
|
||||
if (!a || *a++>127) {
|
||||
tmpc = lookfor(colormap, (unsigned)*r<<16|(unsigned)*g<<8|(unsigned)*b);
|
||||
|
||||
fprintf(file, tmpc->text);
|
||||
fprintf(file, index2str(buf, tmpc->index, colorCount));
|
||||
} else {
|
||||
fprintf(file, transp);
|
||||
}
|
||||
|
||||
@@ -47,10 +47,6 @@ char *alloca ();
|
||||
|
||||
#include <png.h>
|
||||
|
||||
#if PNG_LIBPNG_VER < 96
|
||||
#error libpng_must_be_more_at_least_0_96
|
||||
#endif
|
||||
|
||||
#include "wraster.h"
|
||||
|
||||
|
||||
@@ -158,7 +154,10 @@ RLoadPNG(RContext *context, char *file, int index)
|
||||
if (sgamma==0)
|
||||
sgamma = 1;
|
||||
} else {
|
||||
/*
|
||||
sgamma = 2.0;
|
||||
*/
|
||||
sgamma = 1.0;
|
||||
}
|
||||
|
||||
if (png_get_gAMA(png, pinfo, &gamma))
|
||||
|
||||
@@ -41,7 +41,7 @@ RCreateImage(unsigned width, unsigned height, int alpha)
|
||||
{
|
||||
RImage *image=NULL;
|
||||
int i;
|
||||
|
||||
|
||||
assert(width>0 && height>0);
|
||||
|
||||
image = malloc(sizeof(RImage));
|
||||
|
||||
@@ -19,7 +19,6 @@ void main(int argc, char **argv)
|
||||
puts("cant open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
attr.flags = RC_RenderMode | RC_ColorsPerChannel;
|
||||
attr.render_mode = RM_DITHER;
|
||||
attr.colors_per_channel = 4;
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#define RLRASTER_H_
|
||||
|
||||
|
||||
/* version of the header for the library: 0.10 */
|
||||
#define WRASTER_HEADER_VERSION 10
|
||||
/* version of the header for the library: 0.11 */
|
||||
#define WRASTER_HEADER_VERSION 11
|
||||
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
@@ -110,8 +110,12 @@ typedef struct RContext {
|
||||
int red_offset; /* only used in 24bpp */
|
||||
int green_offset;
|
||||
int blue_offset;
|
||||
|
||||
|
||||
/* only used for pseudocolor and grayscale */
|
||||
|
||||
XStandardColormap *std_rgb_map; /* standard RGB colormap */
|
||||
XStandardColormap *std_gray_map; /* standard grayscale colormap */
|
||||
|
||||
int ncolors; /* total number of colors we can use */
|
||||
XColor *colors; /* internal colormap */
|
||||
|
||||
@@ -358,6 +362,8 @@ RImage *RRenderGradient(unsigned width, unsigned height, RColor *from,
|
||||
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors,
|
||||
int style);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Convertion into X Pixmaps
|
||||
*/
|
||||
@@ -382,6 +388,7 @@ void RPutXImage(RContext *context, Drawable d, GC gc, RXImage *ximage,
|
||||
/* do not free the returned string! */
|
||||
const char *RMessageForError(int errorCode);
|
||||
|
||||
int RBlurImage(RImage *image);
|
||||
|
||||
/****** Global Variables *******/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user