2002-08-12 19:14:44 +00:00
|
|
|
/* canvaspoints.c : Custom ctor for a CanvasPoints struct.
|
|
|
|
*
|
|
|
|
* Author: Rachel Hestilow <hestilow@ximian.com>
|
|
|
|
*
|
|
|
|
* <c> 2002 Rachel Hestilow
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <libgnomecanvas/gnome-canvas.h>
|
|
|
|
#include <libgnomecanvas/gnome-canvas-util.h>
|
|
|
|
|
2003-03-22 17:37:43 +00:00
|
|
|
/* Forward declarations */
|
|
|
|
GnomeCanvasPoints *gtksharp_gnome_canvas_points_new_from_array (guint num_points,
|
|
|
|
double *coords);
|
|
|
|
/* */
|
|
|
|
|
2002-08-12 19:14:44 +00:00
|
|
|
GnomeCanvasPoints*
|
|
|
|
gtksharp_gnome_canvas_points_new_from_array (guint num_points, double *coords)
|
|
|
|
{
|
|
|
|
int i, len;
|
|
|
|
GnomeCanvasPoints *pts = gnome_canvas_points_new (num_points);
|
|
|
|
|
|
|
|
len = num_points * 2;
|
2004-04-28 03:04:56 +00:00
|
|
|
for (i = 0; i < len; i++)
|
2002-08-12 19:14:44 +00:00
|
|
|
pts->coords[i] = coords[i];
|
|
|
|
|
|
|
|
return pts;
|
|
|
|
}
|
|
|
|
|