00001
00002
00003 #ifndef _LIBGNOMECANVASMM_PATH_DEF_H
00004 #define _LIBGNOMECANVASMM_PATH_DEF_H
00005
00006 #include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <libgnomecanvasmm/point.h>
00031 #include <glibmm/containers.h>
00032 #include <libgnomecanvas/gnome-canvas-path-def.h>
00033 #include <libart_lgpl/art_bpath.h>
00034 #include <libart_lgpl/art_point.h>
00035 #include <libart_lgpl/art_bpath.h>
00036
00037
00038 namespace Gnome
00039 {
00040
00041 namespace Canvas
00042 {
00043
00044 class PathDef
00045 {
00046 public:
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048 typedef PathDef CppObjectType;
00049 typedef GnomeCanvasPathDef BaseObjectType;
00050 #endif
00051
00052 static Glib::RefPtr<PathDef> create();
00053
00054
00055 void reference() const;
00056 void unreference() const;
00057
00059 GnomeCanvasPathDef* gobj();
00060
00062 const GnomeCanvasPathDef* gobj() const;
00063
00064
00065 GnomeCanvasPathDef* gobj_copy() const;
00066
00067 protected:
00068
00069 PathDef();
00070 void operator delete(void*, size_t);
00071
00072 private:
00073
00074 PathDef(const PathDef&);
00075 PathDef& operator=(const PathDef&);
00076
00077
00078 public:
00079
00080
00088 static Glib::RefPtr<PathDef> create(int length);
00089
00102 static Glib::RefPtr<PathDef> create(ArtBpath& bpath);
00103
00104
00105
00106
00107
00108
00109
00114 Glib::RefPtr<PathDef> open_parts();
00115
00121 Glib::RefPtr<PathDef> closed_parts();
00122
00128 Glib::RefPtr<PathDef> close_all();
00129
00130
00133 void finish();
00134
00140 void ensure_space(int space);
00141
00142
00145 void reset();
00146
00147
00154 void moveto(double x, double y);
00155
00161 void lineto(double x, double y);
00162
00163
00172 void lineto_moving(double x, double y);
00173
00182 void curveto(double x1, double y1, double x2, double y2, double x3, double y3);
00183
00188 void closepath();
00189
00190
00194 void closepath_current();
00195
00196 Gnome::Art::Point currentpoint() const;
00197
00198
00203 ArtBpath* get_bpath() const;
00204
00209 ArtBpath* first_bpath() const;
00210
00216 ArtBpath* last_bpath() const;
00217
00218
00223 bool is_empty() const;
00224
00230 int length() const;
00231
00237 bool has_currentpoint() const;
00238
00243 bool any_open() const;
00244
00249 bool all_open() const;
00250
00255 bool any_closed() const;
00256
00261 bool all_closed() const;
00262
00263
00264 };
00265
00266 }
00267
00268 }
00269
00270
00271 namespace Glib
00272 {
00273
00275 Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy = false);
00276
00277 }
00278
00279 #endif
00280