mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 02:15:33 +00:00
e65f1814c0
* gdk/Drawable.custom : add a S.D.Rectangle overload for DrawRect. svn path=/trunk/gtk-sharp/; revision=19425
44 lines
1.3 KiB
Plaintext
44 lines
1.3 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);
|
|
}
|
|
|
|
public void DrawRectangle(Gdk.GC gc, bool filled, System.Drawing.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);
|
|
}
|
|
|