Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag

'LIBGDIPLUS_1_0_1'.

svn path=/tags/LIBGDIPLUS_1_0_1/libgdiplus/; revision=31881
  • Loading branch information...
commit cbccf2024268ff2a266701b2fb4ee8f431844b50 6 parents 6c32295 + 7395001 + 6a164e3 + 647c3ac + 07b11a5 + 96ab34a
nobody authored
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2004-07-04 Peter Bartok <pbartok@novell.com>
+ * configure.in: Added fix for bug #60787, added dependency definitons
+ for pthreads (Mark Recht [recht at netbsd.org] verified the fix)
+
2004-05-27 Jordi Mas
* configure.in. make libpng optional depending on the user's system
View
74 configure.in
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libgdiplus,0.10)
+AM_INIT_AUTOMAKE(libgdiplus,1.0.1)
AM_MAINTAINER_MODE
AM_PROG_LIBTOOL
@@ -26,6 +26,78 @@ GDIPLUS_LIBS="`pkg-config --libs cairo glib-2.0 ` `freetype-config --libs`"
GDIPLUS_CFLAGS="`pkg-config --cflags cairo glib-2.0 ` `freetype-config --cflags`"
AC_CHECK_HEADERS(byteswap.h)
+AC_MSG_CHECKING([host threading settings])
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ AC_DEFINE_UNQUOTED(CYGWIN,1,[Win32])
+ AC_CHECK_LIB(intl, gettext)
+ ;;
+
+ *-*-*netbsd*)
+ AC_DEFINE_UNQUOTED(BSDOS,1,[NetBSD])
+ ;;
+
+ *-*-*freebsd*)
+ AC_DEFINE_UNQUOTED(BSDOS,1,[FreeBSD])
+ CFLAGS="-D_THREAD_SAFE $CFLAGS"
+ ;;
+
+ *-*-*openbsd*)
+ AC_DEFINE_UNQUOTED(BSDOS,1,[OpenBSD])
+ CFLAGS="$CFLAGS"
+ LIBS="$LIBS"
+ ;;
+
+ *-*-linux*)
+ AC_DEFINE_UNQUOTED(LINUX,1,[Linux])
+ AC_CHECK_LIB(pthread, pthread_create)
+ ;;
+
+ *-*-solaris*)
+ AC_DEFINE_UNQUOTED(SOLARIS,1,[Solaris])
+ AC_DEFINE_UNQUOTED(_REENTRANT,1,[For libc reentrancy])
+ CFLAGS="-pthreads $CFLAGS"
+ ;;
+
+ *-*-darwin*)
+ AC_DEFINE_UNQUOTED(OSX,1,[OS X])
+ CFLAGS="-no-cpp-precomp $CFLAGS"
+ LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
+ ;;
+
+ *)
+ AC_MSG_RESULT(Unrecognized host $host)
+ AC_DEFINE_UNQUOTED(OTHEROS,1,[Unknown])
+ ;;
+esac
+
+# Apparently for BSD special handling needs to happen
+# See http://archives/neohapsis.com/archives/openbsd/2001-11/2142.html
+# by Miod Vallat <miod@online.fr>
+AC_CACHE_CHECK(
+ [if compiler recognizes -pthread],
+ myapp_cv_gcc_pthread,
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -pthread"
+ AC_LANG_SAVE
+ AC_LANG_C
+ AC_TRY_LINK([#include <pthread.h>],
+ [void *p = pthread_create;],
+ myapp_cv_gcc_pthread=yes,
+ myapp_cv_gcc_pthread=no)
+ AC_LANG_RESTORE
+ CFLAGS=$ac_save_CFLAGS
+)
+if test $myapp_cv_gcc_pthread = yes
+then
+ myapp_threads=""
+ CFLAGS="$CFLAGS -pthread"
+else
+ AC_CHECK_LIB(pthread,pthread_create,myapp_threads=-lpthread,
+ [AC_CHECK_LIB(c_r,pthread_create,myapp_threads=-lc_r)])
+fi
+
+
# sigsetjmp is a macro on some platforms, so can't use AC_CHECK_FUNCS
AC_MSG_CHECKING(for sigsetjmp)
AC_TRY_LINK([#include <setjmp.h>], [
View
18 src/ChangeLog
@@ -1,3 +1,21 @@
+2004-07-30 Ravindra <rkumar@novell.com>
+
+ * graphics.c: Commented out cairo_clip calls from GdipDrawString,
+ as these were causing problems. Thanks to Peter for suggesting this
+ fix. This fixes, bug #60386, #60663, #61414. These bugs were actually
+ because of some problem with Cairo clipping. And, these are not
+ reproducable with Cairo cvs, because Cairo seems to have some changes
+ which have solved the problem with clipping in Cairo.
+
+2004-07-07 Ravindra <rkumar@novell.com>
+
+ * pngcodec.c: Fixes bug #61156 and one perf improvement in
+ image loading.
+
+2004-06-29 Jordi Mas <jordi@ximian.com>
+
+ * pngcodec.c: fixes saving 24-bit images (it was saving corrupted files before)
+
2004-06-29 Jordi Mas <jordi@ximian.com>
* tiffcodec.c: fixes saving images to stream. It was giving an exception
View
11 src/graphics.c
@@ -2155,9 +2155,13 @@ MeasureOrDrawString (GpGraphics *graphics, GDIPCONST WCHAR *stringUnicode, int l
#ifdef DRAWSTRING_DEBUG
printf("Setting clipping rectangle (%d, %d %dx%d)\n", rc->X, rc->Y, rc->Width, rc->Height);
#endif
- cairo_init_clip (graphics->ct);
+ /* Commented following clipping lines to fix DrawString bugs */
+ /* cairo cvs seems to have fixed something which lets us */
+ /* uncomment following clipping lines */
+
+ /* cairo_init_clip (graphics->ct); */
cairo_rectangle (graphics->ct, rc->X, rc->Y, rc->Width, rc->Height);
- cairo_clip (graphics->ct);
+ /* cairo_clip (graphics->ct); */
cairo_new_path (graphics->ct);
}
@@ -2307,7 +2311,8 @@ MeasureOrDrawString (GpGraphics *graphics, GDIPCONST WCHAR *stringUnicode, int l
Done:
/* We need to remove the clip region */
- cairo_init_clip (graphics->ct);
+ /* Following line is commented to fix the DrawString bugs */
+ /* cairo_init_clip (graphics->ct); */
/* Cleanup */
free (CleanString);
View
59 src/pngcodec.c
@@ -174,28 +174,39 @@ gdip_load_png_image_from_file_or_stream (FILE *fp,
rawdata = GdipAlloc (stride * height);
rawptr = rawdata;
- for (i = 0; i < height; i++) {
- if (channels == 4) {
- memcpy (rawptr, row_pointers[i], stride);
- rawptr += stride;
- } else if (channels == 3) {
- png_bytep rowp = row_pointers[i];
- for (j = 0; j < width; j++) {
- *rawptr++ = *rowp++;
- *rawptr++ = *rowp++;
- *rawptr++ = *rowp++;
- *rawptr++ = 255; /* a */
- }
- } else if (channels == 1) {
- png_bytep rowp = row_pointers[i];
- for (j = 0; j < width; j++) {
- png_byte pix = *rowp++;
- *rawptr++ = pix;
- *rawptr++ = pix;
- *rawptr++ = pix;
- *rawptr++ = 255;
- }
- }
+ switch (channels) {
+
+ case 4:
+ for (i = 0; i < height; i++) {
+ memcpy (rawptr, row_pointers[i], stride);
+ rawptr += stride;
+ }
+ break;
+
+ case 3:
+ for (i = 0; i < height; i++) {
+ png_bytep rowp = row_pointers[i];
+ for (j = 0; j < width; j++) {
+ *rawptr++ = *rowp++;
+ *rawptr++ = *rowp++;
+ *rawptr++ = *rowp++;
+ *rawptr++ = 255; /* a */
+ }
+ }
+ break;
+
+ case 1:
+ for (i = 0; i < height; i++) {
+ png_bytep rowp = row_pointers[i];
+ for (j = 0; j < width; j++) {
+ png_byte pix = *rowp++;
+ *rawptr++ = pix;
+ *rawptr++ = pix;
+ *rawptr++ = pix;
+ *rawptr++ = 255;
+ }
+ }
+ break;
}
png_destroy_read_struct (&png_ptr, &info_ptr, &end_info_ptr);
@@ -348,10 +359,10 @@ gdip_save_png_image_to_file_or_stream (FILE *fp,
case Format32bppPArgb:
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
break;
+
+ break;
case Format32bppRgb:
case Format24bppRgb:
- color_type = PNG_COLOR_TYPE_RGB;
- break;
case Format8bppIndexed:
color_type = PNG_COLOR_TYPE_RGB; /* XXX - we should be able to write grayscale PNGs */
break;
Please sign in to comment.
Something went wrong with that request. Please try again.