mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 00:45:41 +00:00
90705a1c98
* api/*-api.xml : regenerated * gdk/Drawable.custom : DrawRectangle filled param is now bool * generator/Parameters.cs : studlify names ending w/ uscore * gtk/GtkSharp.GtkClipboardClearFuncNative : s/Opaque/Object * gtk/GtkSharp.GtkClipboardGetFuncNative : s/Opaque/Object * parser/gapi2xml.pl : put <ns>_string_* methods in Global * sample/Scribble.cs : update to new DrawRectangle api * sources/Gdk.metadata : hide some conflicting methods * sources/Gtk.metadata : finally fix the Progress crap and renames, hides and such to fix conflicts * sources/README : mention new gtk-2.2 reqs * sources/gtk-sharp.sources : update to new gtk-2.2 reqs * sources/makefile : update for 2.2 api svn path=/trunk/gtk-sharp/; revision=16254
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
// Gdk.Drawble.custom - Gdk Drawble class customizations
|
|
//
|
|
// Author: Pedro Abelleira Seco <pedroabelleira@yahoo.es>
|
|
//
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
/// <summary> Size property </summary>
|
|
/// <remarks> Returns the size of the Drawble </remarks>
|
|
public System.Drawing.Size Size {
|
|
get {
|
|
int x, y;
|
|
GetSize (out x, out y);
|
|
return new System.Drawing.Size (x, y);
|
|
}
|
|
}
|
|
|
|
public void DrawRectangle(Gdk.GC gc, bool filled, Gdk.Rectangle area)
|
|
{
|
|
gdk_draw_rectangle(Handle, gc.Handle, filled, area.x, area.y, area.width, area.height);
|
|
}
|
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
static extern void gdk_draw_polygon(IntPtr raw, IntPtr gc, int filled, Gdk.Point[] points, int npoints);
|
|
|
|
public void DrawPolygon(Gdk.GC gc, int filled, Gdk.Point[] points)
|
|
{
|
|
gdk_draw_polygon(Handle, gc.Handle, filled, points, points.Length);
|
|
}
|
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
static extern void gdk_draw_lines(IntPtr raw, IntPtr gc, Gdk.Point[] points, int npoints);
|
|
|
|
public void DrawLines(Gdk.GC gc, Gdk.Point[] points)
|
|
{
|
|
gdk_draw_lines(Handle, gc.Handle, points, points.Length);
|
|
}
|
|
|