2 * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
5 * This file is part of the Gnome Library.
7 * The Gnome Library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * The Gnome Library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with the Gnome Library; see the file COPYING.LIB. If not,
19 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
25 /* Polygon item type for GnomeCanvas widget
27 * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
28 * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
31 * Author: Federico Mena <federico@nuclecu.unam.mx>
32 * Rusty Conover <rconover@bangtail.net>
35 #ifndef GNOME_CANVAS_POLYGON_H
36 #define GNOME_CANVAS_POLYGON_H
39 #include <libgnomecanvas/gnome-canvas.h>
40 #include <libgnomecanvas/gnome-canvas-shape.h>
41 #include <libgnomecanvas/gnome-canvas-path-def.h>
46 /* Polygon item for the canvas. A polygon is a bit different from rectangles and ellipses in that
47 * points inside it will always be considered "inside", even if the fill color is not set. If you
48 * want to have a hollow polygon, use a line item instead.
50 * The following object arguments are available:
52 * name type read/write description
53 * ------------------------------------------------------------------------------------------
54 * points GnomeCanvasPoints* RW Pointer to a GnomeCanvasPoints structure.
55 * This can be created by a call to
56 * gnome_canvas_points_new() (in gnome-canvas-util.h).
57 * X coordinates are in the even indices of the
58 * points->coords array, Y coordinates are in
62 #define GNOME_TYPE_CANVAS_POLYGON (gnome_canvas_polygon_get_type ())
63 #define GNOME_CANVAS_POLYGON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_POLYGON, GnomeCanvasPolygon))
64 #define GNOME_CANVAS_POLYGON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_POLYGON, GnomeCanvasPolygonClass))
65 #define GNOME_IS_CANVAS_POLYGON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_POLYGON))
66 #define GNOME_IS_CANVAS_POLYGON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_POLYGON))
67 #define GNOME_CANVAS_POLYGON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_POLYGON, GnomeCanvasPolygonClass))
70 typedef struct _GnomeCanvasPolygon GnomeCanvasPolygon;
71 typedef struct _GnomeCanvasPolygonClass GnomeCanvasPolygonClass;
73 struct _GnomeCanvasPolygon {
74 GnomeCanvasShape item;
76 GnomeCanvasPathDef *path_def;
79 struct _GnomeCanvasPolygonClass {
80 GnomeCanvasShapeClass parent_class;
84 /* Standard Gtk function */
85 GType gnome_canvas_polygon_get_type (void) G_GNUC_CONST;