[gtkmm] Gdk::Rectangle: Added reference documentation.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::Rectangle: Added reference documentation.
- Date: Tue, 22 Feb 2011 08:47:16 +0000 (UTC)
commit ab956ed77f5b7598d0ccd47c7974d00b376627c4
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Feb 22 09:47:07 2011 +0100
Gdk::Rectangle: Added reference documentation.
* gdk/src/rectangle.hg: Add doxygen comments based on the documentation of
the C API.
ChangeLog | 7 +++++++
gdk/src/rectangle.hg | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9a8983c..1d0b9d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-22 Murray Cumming <murrayc murrayc-desktop>
+
+ Gdk::Rectangle: Added reference documentation.
+
+ * gdk/src/rectangle.hg: Add doxygen comments based on the documentation of
+ the C API.
+
2.99.5:
2011-02-15 Murray Cumming <murrayc murrayc com>
diff --git a/gdk/src/rectangle.hg b/gdk/src/rectangle.hg
index a2a8505..f48de5a 100644
--- a/gdk/src/rectangle.hg
+++ b/gdk/src/rectangle.hg
@@ -35,12 +35,48 @@ class Rectangle
public:
//_CUSTOM_DEFAULT_CTOR
//Rectangle();
+
+ /** Creates a new rectangle instance with these dimensions.
+ */
Rectangle(int x, int y, int width, int height);
+ /** Calculates the union of two rectangles.
+ * The union of this rectangle and @a src2 is the smallest rectangle which includes both this rectangle and @a src2 within it.
+ *
+ * This method returns a reference to this instance, allowing you to then call another method easily.
+ * For instance: rect.join(src2).intersect(src3);
+ *
+ * @param src2 The rectangle with which to calculate the union with this rectangle.
+ * @returns A reference to this rectangle.
+ */
Rectangle& join(const Rectangle& src2);
+
+ /** Calculates the intersection of two rectangles, changing this rectangle.
+ * If the rectangles do not intersect, this rectangle's width and height is set to 0 and its x and y values are undefined.
+ *
+ * This method returns a reference to this instance, allowing you to then call another method easily.
+ * For instance: rect.intersect(src2).join(src3);
+ *
+ * @param src2 The rectangle with which to calculate the intersection with this rectangle.
+ * @returns A reference to this rectangle.
+ */
Rectangle& intersect(const Rectangle& src2);
+
+ /** Calculates the intersection of two rectangles, changing this rectangle.
+ * If the rectangles do not intersect, this rectangle's width and height is set to 0 and its x and y values are undefined.
+ *
+ * This method returns a reference to this instance, allowing you to then call another method easily.
+ * For instance: rect.intersect(src2).join(src3);
+ *
+ * @param src2 The rectangle with which to calculate the intersection with this rectangle.
+ * @param rectangles_interesect This will be set to true if the rectangles intersect.
+ * @returns A reference to this rectangle.
+ */
Rectangle& intersect(const Rectangle& src2, bool& rectangles_intersect);
+ /** Checks whether either the width or height are 0.
+ * @result Whether this rectangle has any non-0 area.
+ */
bool has_zero_area() const;
_MEMBER_GET(x, x, int, int)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]