[gtk-list] [patch] New function in gdkdraw.c: gdk_draw_point()
- From: Patrice Fortier <Patrice Fortier aquarel fr>
- To: gtk-list redhat com
- Subject: [gtk-list] [patch] New function in gdkdraw.c: gdk_draw_point()
- Date: Tue, 11 Nov 1997 11:51:05 +0100
Here is a patch to complete the gdk draw API.
I added the gdk_draw_point function, so now someone can draw
a single point in a window.
I think it's faster to draw a single point in a window than
create an image, draw the point in the image, copy the image
to the window, and destroy the image... but I may be wrong :).
As this is the first time I submit a patch here, I was wondering
what was the "standard way" of doing this?
Sending a diff file to the list (just like this) or is there another
way?
diff-file (against 971109 version) following,
Patrice.
diff -cr gtk+-971109.orig/gdk/gdk.h gtk+-971109/gdk/gdk.h
*** gtk+-971109.orig/gdk/gdk.h Fri Oct 31 06:23:31 1997
--- gtk+-971109/gdk/gdk.h Mon Nov 10 18:59:01 1997
***************
*** 438,443 ****
--- 438,447 ----
/* Drawing
*/
+ void gdk_draw_point (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y);
void gdk_draw_line (GdkDrawable *drawable,
GdkGC *gc,
gint x1,
diff -cr gtk+-971109.orig/gdk/gdkdraw.c gtk+-971109/gdk/gdkdraw.c
*** gtk+-971109.orig/gdk/gdkdraw.c Fri Oct 31 06:23:37 1997
--- gtk+-971109/gdk/gdkdraw.c Mon Nov 10 19:00:43 1997
***************
*** 22,27 ****
--- 22,46 ----
void
+ gdk_draw_point (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y)
+ {
+ GdkWindowPrivate *drawable_private;
+ GdkGCPrivate *gc_private;
+
+ g_return_if_fail (drawable != NULL);
+ g_return_if_fail (gc != NULL);
+
+ drawable_private = (GdkWindowPrivate*) drawable;
+ gc_private = (GdkGCPrivate*) gc;
+
+ XDrawPoint (drawable_private->xdisplay, drawable_private->xwindow,
+ gc_private->xgc, x, y);
+ }
+
+ void
gdk_draw_line (GdkDrawable *drawable,
GdkGC *gc,
gint x1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]