~ubuntu-branches/ubuntu/breezy/libgnomecanvas/breezy

« back to all changes in this revision

Viewing changes to libgnomecanvas/gnome-canvas-rect-ellipse.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2004-09-13 22:40:39 UTC
  • Revision ID: james.westby@ubuntu.com-20040913224039-giftt9jhvyoorcuv
Tags: upstream-2.8.0
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
 
3
 * All rights reserved.
 
4
 *
 
5
 * This file is part of the Gnome Library.
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 */
 
22
/*
 
23
  @NOTATION@
 
24
 */
 
25
/* Rectangle and ellipse item types for GnomeCanvas widget
 
26
 *
 
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.
 
29
 *
 
30
 *
 
31
 * Author: Federico Mena <federico@nuclecu.unam.mx>
 
32
 */
 
33
 
 
34
#ifndef GNOME_CANVAS_RECT_ELLIPSE_H
 
35
#define GNOME_CANVAS_RECT_ELLIPSE_H
 
36
 
 
37
 
 
38
#include <libgnomecanvas/gnome-canvas.h>
 
39
 
 
40
#include <libgnomecanvas/gnome-canvas-shape.h>
 
41
 
 
42
#include <libart_lgpl/art_svp.h>
 
43
 
 
44
G_BEGIN_DECLS
 
45
 
 
46
 
 
47
/* Base class for rectangle and ellipse item types.  These are defined by their top-left and
 
48
 * bottom-right corners.  Rectangles and ellipses share the following arguments:
 
49
 *
 
50
 * name                 type            read/write      description
 
51
 * ------------------------------------------------------------------------------------------
 
52
 * x1                   double          RW              Leftmost coordinate of rectangle or ellipse
 
53
 * y1                   double          RW              Topmost coordinate of rectangle or ellipse
 
54
 * x2                   double          RW              Rightmost coordinate of rectangle or ellipse
 
55
 * y2                   double          RW              Bottommost coordinate of rectangle or ellipse
 
56
 * fill_color           string          W               X color specification for fill color,
 
57
 *                                                      or NULL pointer for no color (transparent)
 
58
 * fill_color_gdk       GdkColor*       RW              Allocated GdkColor for fill
 
59
 * outline_color        string          W               X color specification for outline color,
 
60
 *                                                      or NULL pointer for no color (transparent)
 
61
 * outline_color_gdk    GdkColor*       RW              Allocated GdkColor for outline
 
62
 * fill_stipple         GdkBitmap*      RW              Stipple pattern for fill
 
63
 * outline_stipple      GdkBitmap*      RW              Stipple pattern for outline
 
64
 * width_pixels         uint            RW              Width of the outline in pixels.  The outline will
 
65
 *                                                      not be scaled when the canvas zoom factor is changed.
 
66
 * width_units          double          RW              Width of the outline in canvas units.  The outline
 
67
 *                                                      will be scaled when the canvas zoom factor is changed.
 
68
 */
 
69
 
 
70
 
 
71
#define GNOME_TYPE_CANVAS_RE            (gnome_canvas_re_get_type ())
 
72
#define GNOME_CANVAS_RE(obj)            (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_RE, GnomeCanvasRE))
 
73
#define GNOME_CANVAS_RE_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RE, GnomeCanvasREClass))
 
74
#define GNOME_IS_CANVAS_RE(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_RE))
 
75
#define GNOME_IS_CANVAS_RE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RE))
 
76
#define GNOME_CANVAS_RE_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RE, GnomeCanvasREClass))
 
77
 
 
78
 
 
79
typedef struct _GnomeCanvasRE      GnomeCanvasRE;
 
80
typedef struct _GnomeCanvasREClass GnomeCanvasREClass;
 
81
 
 
82
struct _GnomeCanvasRE {
 
83
        GnomeCanvasShape item;
 
84
 
 
85
        double x1, y1, x2, y2;          /* Corners of item */
 
86
 
 
87
        unsigned int path_dirty : 1;
 
88
};
 
89
 
 
90
struct _GnomeCanvasREClass {
 
91
        GnomeCanvasShapeClass parent_class;
 
92
};
 
93
 
 
94
 
 
95
/* Standard Gtk function */
 
96
GType gnome_canvas_re_get_type (void) G_GNUC_CONST;
 
97
 
 
98
 
 
99
/* Rectangle item.  No configurable or queryable arguments are available (use those in
 
100
 * GnomeCanvasRE).
 
101
 */
 
102
 
 
103
 
 
104
#define GNOME_TYPE_CANVAS_RECT            (gnome_canvas_rect_get_type ())
 
105
#define GNOME_CANVAS_RECT(obj)            (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_RECT, GnomeCanvasRect))
 
106
#define GNOME_CANVAS_RECT_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectClass))
 
107
#define GNOME_IS_CANVAS_RECT(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_RECT))
 
108
#define GNOME_IS_CANVAS_RECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RECT))
 
109
#define GNOME_CANVAS_RECT_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectClass))
 
110
 
 
111
 
 
112
typedef struct _GnomeCanvasRect GnomeCanvasRect;
 
113
typedef struct _GnomeCanvasRectClass GnomeCanvasRectClass;
 
114
 
 
115
struct _GnomeCanvasRect {
 
116
        GnomeCanvasRE re;
 
117
};
 
118
 
 
119
struct _GnomeCanvasRectClass {
 
120
        GnomeCanvasREClass parent_class;
 
121
};
 
122
 
 
123
 
 
124
/* Standard Gtk function */
 
125
GType gnome_canvas_rect_get_type (void) G_GNUC_CONST;
 
126
 
 
127
 
 
128
/* Ellipse item.  No configurable or queryable arguments are available (use those in
 
129
 * GnomeCanvasRE).
 
130
 */
 
131
 
 
132
 
 
133
#define GNOME_TYPE_CANVAS_ELLIPSE            (gnome_canvas_ellipse_get_type ())
 
134
#define GNOME_CANVAS_ELLIPSE(obj)            (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_ELLIPSE, GnomeCanvasEllipse))
 
135
#define GNOME_CANVAS_ELLIPSE_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_ELLIPSE, GnomeCanvasEllipseClass))
 
136
#define GNOME_IS_CANVAS_ELLIPSE(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_ELLIPSE))
 
137
#define GNOME_IS_CANVAS_ELLIPSE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_ELLIPSE))
 
138
#define GNOME_CANVAS_ELLIPSE_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GNOME_TYPE_CANVAS_ELLIPSE, GnomeCanvasEllipseClass))
 
139
 
 
140
 
 
141
typedef struct _GnomeCanvasEllipse GnomeCanvasEllipse;
 
142
typedef struct _GnomeCanvasEllipseClass GnomeCanvasEllipseClass;
 
143
 
 
144
struct _GnomeCanvasEllipse {
 
145
        GnomeCanvasRE re;
 
146
};
 
147
 
 
148
struct _GnomeCanvasEllipseClass {
 
149
        GnomeCanvasREClass parent_class;
 
150
};
 
151
 
 
152
 
 
153
/* Standard Gtk function */
 
154
GType gnome_canvas_ellipse_get_type (void) G_GNUC_CONST;
 
155
 
 
156
 
 
157
G_END_DECLS
 
158
 
 
159
#endif