gnome-sharp2.8.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.A structure to manage an array of points (X and Y coordinates). To be addedGLib.OpaqueMethodGnome.CanvasPointsTo be addedTo be added: an object of type 'Gnome.CanvasPoints'To be addedMethodSystem.VoidTo be addedTo be addedConstructorTo be added
a To be addedConstructorTo be added
a To be addedConstructorCreates canvas points from x and y coordinates stored in array. array of coordinates (num_points * 2 in size), X coordinates are stored in the even-numbered indices, and Y coordinates are stored in the odd-numbered indices.
// LineExample.cs - Displays triangle using gnome canvas
// Compile: mcs -r gtk-sharp.dll -r gnome-sharp.dll LineExample.cs
namespace GnomeSamples {
using System;
using Gtk;
using Gnome;
public class LineExample {
public static int Main (string[] args) {
Application.Init ();
Gtk.Window win = new Gtk.Window ("Canvas line example");
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
Canvas canvas = new Canvas ();
win.Add (canvas);
CanvasLine line = new CanvasLine (canvas.Root ());
line.Points = new CanvasPoints (new double[]{40,0, 0,80, 80,80, 40,0});
win.ShowAll ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, DeleteEventArgs args) {
Application.Quit ();
args.RetVal = true;
}
}
}
PropertyGLib.GTypeGType Property.a Returns the native value for .