[perl-Gtk2] Allow passing no segments to Gtk2::Gdk::Drawable::draw_segments()
- From: Torsten Schönfeld <tsch src gnome org>
- To: svn-commits-list gnome org
- Subject: [perl-Gtk2] Allow passing no segments to Gtk2::Gdk::Drawable::draw_segments()
- Date: Sun, 19 Jul 2009 12:51:07 +0000 (UTC)
commit 650e0f49566a322f4c196a6eefaf077693d28d74
Author: Kevin Ryde <user42 zip com au>
Date: Sun Jul 19 14:50:09 2009 +0200
Allow passing no segments to Gtk2::Gdk::Drawable::draw_segments()
Signed-off-by: Torsten Schönfeld <kaffeetisch gmx de>
t/GdkDrawable.t | 3 ++-
xs/GdkDrawable.xs | 13 ++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/t/GdkDrawable.t b/t/GdkDrawable.t
index fae30b1..897fa55 100644
--- a/t/GdkDrawable.t
+++ b/t/GdkDrawable.t
@@ -65,6 +65,7 @@ $win -> draw_point($gc, 10, 10);
$win -> draw_points($gc, 10, 10, 11, 11, 12, 12, 13, 13);
$win -> draw_line($gc, 5, 5, 10, 10);
$win -> draw_lines($gc, 5, 5, 10, 10, 15, 15, 20, 20);
+$win -> draw_segments($gc);
$win -> draw_segments($gc, 1, 2, 3, 4, 10, 11, 12, 13);
$win -> draw_rectangle($gc, 1, 0, 0, 10, 10);
$win -> draw_arc($gc, 1, 5, 5, 10, 10, 23, 42);
@@ -106,5 +107,5 @@ SKIP: {
__END__
-Copyright (C) 2003-2008 by the gtk2-perl team (see the file AUTHORS for the
+Copyright (C) 2003-2009 by the gtk2-perl team (see the file AUTHORS for the
full list). See LICENSE for more information.
diff --git a/xs/GdkDrawable.xs b/xs/GdkDrawable.xs
index 0e97dad..afd418a 100644
--- a/xs/GdkDrawable.xs
+++ b/xs/GdkDrawable.xs
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS)
+ * Copyright (c) 2003-2005, 2009 by the gtk2-perl team (see the file AUTHORS)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -220,14 +220,13 @@ gdk_draw_points (drawable, gc, x1, y1, ...)
#### void gdk_draw_segments (GdkDrawable *drawable, GdkGC *gc, GdkSegment *segs, gint nsegs)
=for apidoc
-=for arg x1 (integer) the x coordinate of the first point
-=for arg y1 (integer) the y coordinate of the first point
-=for arg x2 (integer) the x coordinate of the second point
-=for arg y2 (integer) the y coordinate of the second point
-=for arg ... quads of x and y coordinates
+=for arg ... quads of x1,y1,x2,y2 coordinates
+For example to draw two diagonal line segments,
+
+ $drawable->draw_segments($gc, 0,0,100,100, 200,200,300,300);
=cut
void
-gdk_draw_segments (drawable, gc, x1, y1, x2, y2, ...)
+gdk_draw_segments (drawable, gc, ...)
GdkDrawable *drawable
GdkGC *gc
PREINIT:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]