1 /* gtk-canvas-simpleline.h: GtkCanvas 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 __GTK_CANVAS_SIMPLELINE_H__
23 #define __GTK_CANVAS_SIMPLELINE_H__
27 #include <gtk-canvas/gtk-canvas-defs.h>
28 #include "gtk-canvas/gtk-canvas.h"
30 BEGIN_GTK_CANVAS_DECLS
32 /* Wave viewer item for canvas.
35 #define GTK_CANVAS_TYPE_CANVAS_SIMPLELINE (gtk_canvas_simpleline_get_type ())
36 #define GTK_CANVAS_SIMPLELINE(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLine))
37 #define GTK_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLineClass))
38 #define GTK_CANVAS_IS_CANVAS_SIMPLELINE(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
39 #define GTK_CANVAS_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
41 typedef struct _GtkCanvasSimpleLine GtkCanvasSimpleLine;
42 typedef struct _GtkCanvasSimpleLineClass GtkCanvasSimpleLineClass;
44 struct _GtkCanvasSimpleLine
47 double x1, y1, x2, y2;
51 /* cached values set during update/used during render */
53 unsigned char r, b, g, a;
54 guint32 bbox_ulx, bbox_uly;
55 guint32 bbox_lrx, bbox_lry;
58 struct _GtkCanvasSimpleLineClass {
59 GtkCanvasItemClass parent_class;
62 GtkType gtk_canvas_simpleline_get_type (void);
66 #endif /* __GTK_CANVAS_SIMPLELINE_H__ */