1 /* libgnomecanvas/gnome-canvas-simpleline.h: GnomeCanvas item for simple rects
3 * Copyright (C) 2001 Paul Davis <pbd@op.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 #ifndef __GNOME_CANVAS_SIMPLELINE_H__
23 #define __GNOME_CANVAS_SIMPLELINE_H__
27 #include <libgnomecanvas/libgnomecanvas.h>
31 /* Wave viewer item for canvas.
34 #define GNOME_TYPE_CANVAS_SIMPLELINE (gnome_canvas_simpleline_get_type ())
35 #define GNOME_CANVAS_SIMPLELINE(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLine))
36 #define GNOME_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLineClass))
37 #define GNOME_IS_CANVAS_SIMPLELINE(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_SIMPLELINE))
38 #define GNOME_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_SIMPLELINE))
39 #define GNOME_CANVAS_SIMPLELINE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GNOME_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLineClass))
41 typedef struct _GnomeCanvasSimpleLine GnomeCanvasSimpleLine
;
42 typedef struct _GnomeCanvasSimpleLineClass GnomeCanvasSimpleLineClass
;
44 struct _GnomeCanvasSimpleLine
47 double x1
, y1
, x2
, y2
; /* parent-relative, world coordinates */
48 gint32 cx1
, cy1
, cx2
, cy2
; /* global, canvas coordinates */
51 /* cached values set during update/used during render */
53 unsigned char r
, b
, g
, a
;
56 struct _GnomeCanvasSimpleLineClass
{
57 GnomeCanvasItemClass parent_class
;
60 GType
gnome_canvas_simpleline_get_type (void) G_GNUC_CONST
;
64 #endif /* __GNOME_CANVAS_SIMPLELINE_H__ */