[Gtk-sharp-list] Gdk.Drawable.DrawPoints
Philipp Baer
phbaer at npw.net
Tue May 2 15:25:29 EDT 2006
Hi,
the method Gdk.Drawable.DrawPoints has a wrong signature.
It currently is
public void DrawPoints(Gdk.GC gc, Gdk.Point points, int npoints)
and should be something like
public void DrawPoints(Gdk.GC gc, Gdk.Point[] points)
I picked this signature to be consistent with the DrawLines
method.
Sebastian Droege has submit a bugreport already:
http://bugzilla.ximian.com/show_bug.cgi?id=77942
Please find a sample patch attached. Is this the correct list
for patches/bugreports or should I crosspost to mono-devel
as well?
phb
--
Philipp Baer <phbaer at npw.net> [http://www.npw.net/]
--------------- contact information ---------------
mobile |+49-179-488 26 63| fax |+49-561-804 62 77|
most current contact details |'whois pb4412-ripe'|
---------------- gnupg-fingerprint ----------------
|16C7 84E8 5C5F C3D6 A8F1 A4DC E4CB A9A9 F5FA FF5D|
-------------- next part --------------
Index: doc/en/Gdk/Drawable.xml
===================================================================
--- doc/en/Gdk/Drawable.xml (revision 60191)
+++ doc/en/Gdk/Drawable.xml (working copy)
@@ -19,22 +19,19 @@
</Interfaces>
<Members>
<Member MemberName="DrawPoints">
- <MemberSignature Language="C#" Value="public void DrawPoints (Gdk.GC gc, Gdk.Point points, int npoints);" />
+ <MemberSignature Language="C#" Value="public void DrawPoints (Gdk.GC gc, Gdk.Point[] points);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="gc" Type="Gdk.GC" />
- <Parameter Name="points" Type="Gdk.Point" />
- <Parameter Name="npoints" Type="System.Int32" />
+ <Parameter Name="points" Type="Gdk.Point[]" />
</Parameters>
<Docs>
<summary>Draws a number of points using the given graphics context.</summary>
<param name="gc">A <see cref="T:Gdk.GC" /></param>
<param name="points">An array of <see cref="T:Gdk.Point" /> objects.</param>
- <param name="npoints">A <see cref="T:System.Int32" /></param>
- <remarks>NOTE: Drawable.custom needs to be fixed to implement this properly.</remarks>
</Docs>
</Member>
<Member MemberName="DrawLayoutWithColors">
Index: gdk/Drawable.custom
===================================================================
--- gdk/Drawable.custom (revision 60191)
+++ gdk/Drawable.custom (working copy)
@@ -47,6 +47,15 @@
}
[DllImport("libgdk-win32-2.0-0.dll")]
+static extern void gdk_draw_points(IntPtr raw, IntPtr gc, Gdk.Point[] points, int npoints);
+
+public void DrawPoints(Gdk.GC gc, Gdk.Point[] points)
+{
+ gdk_draw_points(Handle, gc.Handle, points, points.Length);
+}
+
+
+[DllImport("libgdk-win32-2.0-0.dll")]
internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw);
[DllImport("libgdk-win32-2.0-0.dll")]
Index: gdk/Gdk.metadata
===================================================================
--- gdk/Gdk.metadata (revision 60191)
+++ gdk/Gdk.metadata (working copy)
@@ -76,6 +76,7 @@
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawRgb32Image']/*/*[@name='buf']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawRgb32ImageDithalign']/*/*[@name='buf']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawLines']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPoints']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='GetSize']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='SetData']/*/*[@name='destroy_func']" name="type">gpointer</attr>
More information about the Gtk-sharp-list
mailing list