+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
+1999-08-16 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial
+ endpoint calculations which were totally wrong. (A little RTFMing
+ helps a lot ;-)
+
+ * gtk/makefile.{cygwin,msc}: Use libintl extracted from glibc
+ from a separate directory, not from gettext, because of licensing
+ issues (we want to use the LGPL version).
+
+ * README.win32: Mention the intl from glibc vs from gettext issue.
+
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
be downloaded from http://www.pointing.com. If you don't care for
that, undefine HAVE_WINTAB in config.h.win32 before building.
-GTk+ wants to be built with the GNU gettext library for
+GTk+ wants to be built with the GNU "intl" library for
internationalisation (i18n). Get the version ported to Win32 (not a
-very big deal) from tml's web site mentioned above. If you don't want
-any i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in
-the config.h.win32 file, and remove references to the gnu-intl library
-from the makefiles.
+very big deal) from tml's web site mentioned above. We build the
+"intl" library to a DLL called gnu-intl.dll to reduce name clash
+risks. If you don't want any i18n stuff, undefine ENABLE_NLS,
+HAVE_GETTEXT and HAVE_LIBINTL in the config.h.win32 file, and remove
+references to the gnu-intl library from the makefiles.
-Note that GNU gettext is under the GPL, not the LGPL like GTk+ or
-GLib. So, if GPL is a problem to you, follow the above advice to
-remove the use of gettext.
+Note that while the GNU gettext package is under the GPL, the "intl"
+library part as distributed with GNU libc is under the LGPL (like GTk+
+or GLib). We want the LGPL one, even if they are the same, more or
+less.
#include <gdk/gdk.h>
#include "gdkprivate.h"
-#ifndef M_TWOPI
-#define M_TWOPI (2.0 * 3.14159265358979323846)
+#ifndef G_PI
+#define G_PI 3.14159265358979323846
#endif
void
if (height == -1)
height = drawable_private->height;
- if (width != 0 && height != 0)
+ GDK_NOTE (MISC, g_print ("gdk_draw_arc: %#x %d,%d,%d,%d %d %d\n",
+ drawable_private->xwindow,
+ x, y, width, height, angle1, angle2));
+
+ if (width != 0 && height != 0 && angle2 != 0)
{
hdc = gdk_gc_predraw (drawable_private, gc_private);
- nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
- nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
- nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
- nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
+ if (angle2 >= 360*64)
+ {
+ nXStartArc = nYStartArc = nXEndArc = nYEndArc = 0;
+ }
+ else if (angle2 > 0)
+ {
+ /* The 100. is just an arbitrary value */
+ nXStartArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.);
+ nYStartArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.);
+ nXEndArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.);
+ nYEndArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.);
+ }
+ else
+ {
+ nXEndArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.);
+ nYEndArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.);
+ nXStartArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.);
+ nYStartArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.);
+ }
if (filled)
{
+ GDK_NOTE (MISC, g_print ("...Pie(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
+ x, y, x+width, y+height,
+ nXStartArc, nYStartArc,
+ nXEndArc, nYEndArc));
Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
else
{
+ GDK_NOTE (MISC, g_print ("...Arc(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
+ x, y, x+width, y+height,
+ nXStartArc, nYStartArc,
+ nXEndArc, nYEndArc));
Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
#include <gdk/gdk.h>
#include "gdkprivate.h"
-#ifndef M_TWOPI
-#define M_TWOPI (2.0 * 3.14159265358979323846)
+#ifndef G_PI
+#define G_PI 3.14159265358979323846
#endif
void
if (height == -1)
height = drawable_private->height;
- if (width != 0 && height != 0)
+ GDK_NOTE (MISC, g_print ("gdk_draw_arc: %#x %d,%d,%d,%d %d %d\n",
+ drawable_private->xwindow,
+ x, y, width, height, angle1, angle2));
+
+ if (width != 0 && height != 0 && angle2 != 0)
{
hdc = gdk_gc_predraw (drawable_private, gc_private);
- nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
- nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
- nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
- nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
+ if (angle2 >= 360*64)
+ {
+ nXStartArc = nYStartArc = nXEndArc = nYEndArc = 0;
+ }
+ else if (angle2 > 0)
+ {
+ /* The 100. is just an arbitrary value */
+ nXStartArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.);
+ nYStartArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.);
+ nXEndArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.);
+ nYEndArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.);
+ }
+ else
+ {
+ nXEndArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.);
+ nYEndArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.);
+ nXStartArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.);
+ nYStartArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.);
+ }
if (filled)
{
+ GDK_NOTE (MISC, g_print ("...Pie(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
+ x, y, x+width, y+height,
+ nXStartArc, nYStartArc,
+ nXEndArc, nYEndArc));
Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
else
{
+ GDK_NOTE (MISC, g_print ("...Arc(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
+ x, y, x+width, y+height,
+ nXStartArc, nYStartArc,
+ nXEndArc, nYEndArc));
Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
GDKSYSDEP = ../gdk/win32
GLIB = ../../glib
-GETTEXT = ../../gettext-0.10.35
+INTL = ../../intl
-CFLAGS = $(OPTIMIZE) -I . -I .. -I $(GDKSYSDEP) -I $(GLIB) -I $(GLIB)/gmodule -I $(GETTEXT)/intl -DGTK_DISABLE_COMPAT_H
+CFLAGS = $(OPTIMIZE) -I . -I .. -I $(GDKSYSDEP) -I $(GLIB) -I $(GLIB)/gmodule -I $(INTL) -DGTK_DISABLE_COMPAT_H
all : \
../config.h \
# Linking:
#
gtk-$(GTK_VER).dll : generated $(gtk_OBJECTS) gtk.def
- $(GLIB)/build-dll gtk $(GTK_VER) gtk.def $(gtk_OBJECTS) -L $(GDKSYSDEP) -lgdk-$(GTK_VER) -L$(GETTEXT)/intl -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) -lgdi32 -luser32
+ $(GLIB)/build-dll gtk $(GTK_VER) gtk.def $(gtk_OBJECTS) -L $(GDKSYSDEP) -lgdk-$(GTK_VER) -L$(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) -lgdi32 -luser32
# General rule for compiling the objects into the DLL
.c.o :
GDKSYSDEP = ..\gdk\win32
GLIB = ..\..\glib
-GETTEXT = ..\..\gettext-0.10.35
+INTL = ..\..\gettext-0.10.35
-CFLAGS = -I. -I.. -I$(GDKSYSDEP) -I$(GLIB) -I$(GLIB)\gmodule -I$(GETTEXT)\intl -DGTK_DISABLE_COMPAT_H
+CFLAGS = -I. -I.. -I$(GDKSYSDEP) -I$(GLIB) -I$(GLIB)\gmodule -I$(INTL) -DGTK_DISABLE_COMPAT_H
all : \
..\config.h \
# Linking:
#
gtk-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
- $(CC) $(CFLAGS) -LD -Fegtk-$(GTK_VER).dll $(gtk_OBJECTS) $(GDKSYSDEP)\gdk-$(GTK_VER).lib $(GETTEXT)\intl\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib gdi32.lib user32.lib $(LDFLAGS) /def:gtk.def
+ $(CC) $(CFLAGS) -LD -Fegtk-$(GTK_VER).dll $(gtk_OBJECTS) $(GDKSYSDEP)\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib gdi32.lib user32.lib $(LDFLAGS) /def:gtk.def
# General rule for compiling the objects into the DLL
.c.obj :