2003-01-06 00:50:42 +00:00
|
|
|
// 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 {
|
2003-01-06 01:07:10 +00:00
|
|
|
int x, y;
|
|
|
|
GetSize (out x, out y);
|
|
|
|
return new System.Drawing.Size (x, y);
|
2003-01-06 00:50:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-07-15 05:52:09 +00:00
|
|
|
public void DrawRectangle(Gdk.GC gc, bool filled, Gdk.Rectangle area)
|
2003-02-28 04:54:01 +00:00
|
|
|
{
|
2004-02-10 16:04:50 +00:00
|
|
|
gdk_draw_rectangle(Handle, gc.Handle, filled, area.X, area.Y, area.Width, area.Height);
|
2003-02-28 04:54:01 +00:00
|
|
|
}
|
2003-04-04 07:24:02 +00:00
|
|
|
|
2003-10-27 20:00:15 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2003-04-04 07:24:02 +00:00
|
|
|
[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);
|
|
|
|
}
|
|
|
|
|