summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--cairomm/context.h23
-rw-r--r--cairomm/path.h7
3 files changed, 36 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 87adeee..fbacfe7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2006-05-08 Jonathon Jongsma <jonathon.jongsma@gmail.com>
+ * cairomm/context.h:
+ * cairomm/path.h: added some preliminary documentation explaining that the
+ caller is responsible for freeing Path objects returned from
+ Context::copy_path() and Context::copy_path_flat().
+
+2006-05-08 Jonathon Jongsma <jonathon.jongsma@gmail.com>
+
* cairomm/cairomm.h: Add doxygen API introduction test here.
* docs/reference/Doxyfile.in:
* docs/reference/Makefile.am:
diff --git a/cairomm/context.h b/cairomm/context.h
index cd7a2ba..13cbd6d 100644
--- a/cairomm/context.h
+++ b/cairomm/context.h
@@ -746,7 +746,30 @@ public:
RefPtr<const Surface> get_target() const;
//TODO: Copy or reference-count a Path somethow instead of asking the caller to delete it?
+ /** Creates a copy of the current path and returns it to the user.
+ *
+ * \todo See cairo_path_data_t for hints on how to iterate over the returned
+ * data structure.
+ *
+ * \note The caller owns the Path object returned from this function. The
+ * Path object must be freed when you are finished with it.
+ */
Path* copy_path() const;
+
+ /** Gets a flattened copy of the current path and returns it to the user
+ *
+ * \todo See cairo_path_data_t for hints on how to iterate over the returned
+ * data structure.
+ *
+ * This function is like copy_path() except that any curves in the path will
+ * be approximated with piecewise-linear approximations, (accurate to within
+ * the current tolerance value). That is, the result is guaranteed to not have
+ * any elements of type CAIRO_PATH_CURVE_TO which will instead be
+ * replaced by a series of CAIRO_PATH_LINE_TO elements.
+ *
+ * \note The caller owns the Path object returned from this function. The
+ * Path object must be freed when you are finished with it.
+ */
Path* copy_path_flat() const;
/** Append the path onto the current path. The path may be either the return
diff --git a/cairomm/path.h b/cairomm/path.h
index 5b0a2ca..909170f 100644
--- a/cairomm/path.h
+++ b/cairomm/path.h
@@ -28,7 +28,12 @@ namespace Cairo
{
/** A data structure for holding a path.
- * Use Context::copy_path() or Context::copy_path_flat() to instantiate a new Path.
+ * Use Context::copy_path() or Context::copy_path_flat() to instantiate a new
+ * Path. The application is responsible for freeing the Path object when it is
+ * no longer needed.
+ *
+ * \todo There's currently no way to access the path data without reverting to
+ * the C object (see cobj())
*/
class Path
{