00001
00002
00003 #ifndef _LIBGNOMECANVASMM_PATH_DEF_H
00004 #define _LIBGNOMECANVASMM_PATH_DEF_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <libgnomecanvasmm/point.h>
00032 #include <glibmm/containers.h>
00033 #include <libgnomecanvas/gnome-canvas-path-def.h>
00034 #include <libart_lgpl/art_bpath.h>
00035 #include <libart_lgpl/art_point.h>
00036 #include <libart_lgpl/art_bpath.h>
00037
00038
00039 namespace Gnome
00040 {
00041
00042 namespace Canvas
00043 {
00044
00045 class PathDef
00046 {
00047 public:
00048 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00049 typedef PathDef CppObjectType;
00050 typedef GnomeCanvasPathDef BaseObjectType;
00051 #endif
00052
00053 static Glib::RefPtr<PathDef> create();
00054
00055
00056 void reference() const;
00057 void unreference() const;
00058
00060 GnomeCanvasPathDef* gobj();
00061
00063 const GnomeCanvasPathDef* gobj() const;
00064
00066 GnomeCanvasPathDef* gobj_copy() const;
00067
00068 protected:
00069
00070 PathDef();
00071 void operator delete(void*, size_t);
00072
00073 private:
00074
00075 PathDef(const PathDef&);
00076 PathDef& operator=(const PathDef&);
00077
00078
00079 public:
00080
00081
00089 static Glib::RefPtr<PathDef> create(int length);
00090
00103 static Glib::RefPtr<PathDef> create(ArtBpath& bpath);
00104
00105
00106
00107
00108
00109
00110
00115 Glib::RefPtr<PathDef> open_parts();
00116
00122 Glib::RefPtr<PathDef> closed_parts();
00123
00129 Glib::RefPtr<PathDef> close_all();
00130
00131
00134 void finish();
00135
00141 void ensure_space(int space);
00142
00143
00146 void reset();
00147
00148
00155 void moveto(double x, double y);
00156
00162 void lineto(double x, double y);
00163
00164
00173 void lineto_moving(double x, double y);
00174
00183 void curveto(double x1, double y1, double x2, double y2, double x3, double y3);
00184
00189 void closepath();
00190
00191
00195 void closepath_current();
00196
00197 Gnome::Art::Point currentpoint() const;
00198
00199
00204 ArtBpath* get_bpath() const;
00205
00210 ArtBpath* first_bpath() const;
00211
00217 ArtBpath* last_bpath() const;
00218
00219
00224 bool is_empty() const;
00225
00231 int length() const;
00232
00238 bool has_currentpoint() const;
00239
00244 bool any_open() const;
00245
00250 bool all_open() const;
00251
00256 bool any_closed() const;
00257
00262 bool all_closed() const;
00263
00264
00265 };
00266
00267 }
00268
00269 }
00270
00271
00272 namespace Glib
00273 {
00274
00283 Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy = false);
00284
00285 }
00286
00287
00288 #endif
00289