[haiku-commits] haiku: hrev47496 - docs/user/interface src/kits/interface headers/os/interface

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 15 Jul 2014 01:03:33 +0200 (CEST)

hrev47496 adds 3 changesets to branch 'master'
old head: 4fab93c7fc4f7efdd2c9b7336c0e1b3a7b6547fd
new head: cb65c3a0378d10d3e053772f8c15bc2fe95a844b
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=cb65c3a+%5E4fab93c

----------------------------------------------------------------------------

22da33b: Add a few missing \fn's to BFont docs

db1ef05: BShape: Style fixes for docs

cb65c3a: Document BShape and BShapeIterator

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

5 files changed, 543 insertions(+), 58 deletions(-)
docs/user/interface/Font.dox             |  12 +-
docs/user/interface/Shape.dox            | 459 +++++++++++++++++++++++++++
headers/os/interface/Shape.h             |  14 +-
headers/private/interface/ShapePrivate.h |  12 +-
src/kits/interface/Shape.cpp             | 104 +++---

############################################################################

Commit:      22da33b202d957f152cabe63cd31543c8ce692a6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=22da33b
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Jul 14 23:02:12 2014 UTC

Add a few missing \fn's to BFont docs

----------------------------------------------------------------------------

diff --git a/docs/user/interface/Font.dox b/docs/user/interface/Font.dox
index c7e6975..e54afa0 100644
--- a/docs/user/interface/Font.dox
+++ b/docs/user/interface/Font.dox
@@ -1713,7 +1713,7 @@
 
 
 /*!
-       void BFont::GetGlyphShapes(const char charArray[], int32 numChars,
+       \fn void BFont::GetGlyphShapes(const char charArray[], int32 numChars,
                BShape *glyphShapeArray[]) const
        \brief Writes an array of BShape objects to \a glyphShapeArray
                representing the glyph shapes of each character in
@@ -1730,7 +1730,7 @@
 
 
 /*!
-       void BFont::GetHasGlyphs(const char charArray[], int32 numChars,
+       \fn void BFont::GetHasGlyphs(const char charArray[], int32 numChars,
                bool hasArray[]) const
        \brief Fills out \a hasArray with whether or not each characters in
                \a charArray has a glyph for the font.
@@ -1748,7 +1748,7 @@
 
 
 /*!
-       BFont& BFont::operator=(const BFont &font)
+       \fn BFont& BFont::operator=(const BFont &font)
        \brief Assignment overload method.
 
        \param font The BFont object to assign from.
@@ -1758,7 +1758,7 @@
 
 
 /*!
-       bool BFont::operator==(const BFont &font) const
+       \fn bool BFont::operator==(const BFont &font) const
        \brief Equality comparison overload method.
 
        \param font The BFont object to compare the current font to.
@@ -1770,7 +1770,7 @@
 
 
 /*!
-       bool BFont::operator!=(const BFont &font) const
+       \fn bool BFont::operator!=(const BFont &font) const
        \brief Inequality comparison overload method.
 
        \param font The BFont object to compare the current font to.
@@ -1783,7 +1783,7 @@
 
 
 /*!
-       void BFont::PrintToStream() const
+       \fn void BFont::PrintToStream() const
        \brief Writes information about the font to \c stdout.
 
        printf("BFont { %s (%d), %s (%d) 0x%x %f/%f %fpt (%f %f %f), %d }\n",

############################################################################

Commit:      db1ef05aef84288fef063a72b73676f6cdf61ee4
URL:         http://cgit.haiku-os.org/haiku/commit/?id=db1ef05
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Jul 14 23:02:44 2014 UTC

BShape: Style fixes for docs

----------------------------------------------------------------------------

diff --git a/headers/os/interface/Shape.h b/headers/os/interface/Shape.h
index b287ed5..dc55e75 100644
--- a/headers/os/interface/Shape.h
+++ b/headers/os/interface/Shape.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2007, Haiku, Inc. All rights reserved.
+ * Copyright 2002-2010 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  */
 #ifndef _SHAPE_H
@@ -8,6 +8,7 @@
 
 #include <Archivable.h>
 
+
 class BPoint;
 class BRect;
 class BShape;
@@ -25,9 +26,9 @@ public:
 
        virtual status_t                        IterateMoveTo(BPoint* point);
        virtual status_t                        IterateLineTo(int32 lineCount,
-                                                                       BPoint* 
linePts);
+                                                                       BPoint* 
linePoints);
        virtual status_t                        IterateBezierTo(int32 
bezierCount,
-                                                                       BPoint* 
bezierPts);
+                                                                       BPoint* 
bezierPoints);
        virtual status_t                        IterateClose();
 
        virtual status_t                        IterateArcTo(float& rx, float& 
ry,
@@ -81,7 +82,7 @@ public:
 
 private:
        // FBC padding
-       virtual status_t                        Perform(perform_code code, 
void* data);
+       virtual status_t                        Perform(perform_code code, 
void* data);
 
        virtual void                            _ReservedShape1();
        virtual void                            _ReservedShape2();
@@ -96,10 +97,10 @@ private:
        friend class BPrivate::ServerLink;
 
                        void                            GetData(int32* opCount, 
int32* ptCount,
-                                                                       
uint32** opList, BPoint** ptList);
+                                                                       
uint32** opList, BPoint** pointsList);
                        void                            SetData(int32 opCount, 
int32 ptCount,
                                                                        const 
uint32* opList,
-                                                                       const 
BPoint* ptList);
+                                                                       const 
BPoint* pointsList);
                        void                            InitData();
                        bool                            AllocatePts(int32 
count);
                        bool                            AllocateOps(int32 
count);
@@ -112,4 +113,5 @@ private:
                        uint32                          reserved[4];
 };
 
+
 #endif // _SHAPE_H
diff --git a/headers/private/interface/ShapePrivate.h 
b/headers/private/interface/ShapePrivate.h
index 6262e0d..38b1bee 100644
--- a/headers/private/interface/ShapePrivate.h
+++ b/headers/private/interface/ShapePrivate.h
@@ -1,14 +1,15 @@
 /*
- * Copyright 2003-2010, Haiku.
+ * Copyright 2003-2010 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
- *             Adrian Oanca <adioanca@xxxxxxxxxxxxx>
  *             Axel Dörfler, axeld@xxxxxxxxxxxxxxxx
+ *             Adrian Oanca, adioanca@xxxxxxxxxxxxx
  */
 #ifndef SHAPE_PRIVATE_H
 #define SHAPE_PRIVATE_H
 
+
 #define OP_LINETO                      0x10000000
 #define OP_BEZIERTO                    0x20000000
 #define OP_CLOSE                       0x40000000
@@ -20,12 +21,13 @@
 
 
 struct shape_data {
-       uint32  *opList;
+       uint32* opList;
        int32   opCount;
        int32   opSize;
-       BPoint  *ptList;
+       BPoint* ptList;
        int32   ptCount;
        int32   ptSize;
 };
 
-#endif
+
+#endif // SHAPE_PRIVATE_H
diff --git a/src/kits/interface/Shape.cpp b/src/kits/interface/Shape.cpp
index 0f811be..909f8e4 100644
--- a/src/kits/interface/Shape.cpp
+++ b/src/kits/interface/Shape.cpp
@@ -1,15 +1,14 @@
 /*
- * Copyright (c) 2001-2010, Haiku, Inc.
+ * Copyright 2003-2010 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT license.
  *
  * Authors:
- *             Marc Flerackers (mflerackers@xxxxxxxxxx)
- *             Stephan Aßmus <superstippi@xxxxxx>
- *             Michael Lotz <mmlr@xxxxxxxx>
- *             Marcus Overhagen <marcus@xxxxxxxxxxxx>
+ *             Stephan Aßmus, superstippi@xxxxxx
+ *             Marc Flerackers, mflerackers@xxxxxxxxxx
+ *             Michael Lotz, mmlr@xxxxxxxx
+ *             Marcus Overhagen, marcus@xxxxxxxxxxxx
  */
 
-/*! BShape encapsulates a Postscript-style "path" */
 
 #include <Shape.h>
 
@@ -24,6 +23,7 @@
 #include <string.h>
 
 
+//     #pragma mark - BShapeIterator
 
 
 BShapeIterator::BShapeIterator()
@@ -45,25 +45,26 @@ BShapeIterator::Iterate(BShape* shape)
        for (int32 i = 0; i < data->opCount; i++) {
                int32 op = data->opList[i] & 0xFF000000;
 
-               if (op & OP_MOVETO) {
+               if ((op & OP_MOVETO) != 0) {
                        IterateMoveTo(points);
                        points++;
                }
 
-               if (op & OP_LINETO) {
+               if ((op & OP_LINETO) != 0) {
                        int32 count = data->opList[i] & 0x00FFFFFF;
                        IterateLineTo(count, points);
                        points += count;
                }
 
-               if (op & OP_BEZIERTO) {
+               if ((op & OP_BEZIERTO) != 0) {
                        int32 count = data->opList[i] & 0x00FFFFFF;
                        IterateBezierTo(count / 3, points);
                        points += count;
                }
 
-               if ((op & OP_LARGE_ARC_TO_CW) || (op & OP_LARGE_ARC_TO_CCW)
-                       || (op & OP_SMALL_ARC_TO_CW) || (op & 
OP_SMALL_ARC_TO_CCW)) {
+               if ((op & OP_LARGE_ARC_TO_CW) != 0 || (op & 
OP_LARGE_ARC_TO_CCW) != 0
+                       || (op & OP_SMALL_ARC_TO_CW) != 0
+                       || (op & OP_SMALL_ARC_TO_CCW) != 0) {
                        int32 count = data->opList[i] & 0x00FFFFFF;
                        for (int32 i = 0; i < count / 3; i++) {
                                IterateArcTo(points[0].x, points[0].y, 
points[1].x,
@@ -74,9 +75,8 @@ BShapeIterator::Iterate(BShape* shape)
                        }
                }
 
-               if (op & OP_CLOSE) {
+               if ((op & OP_CLOSE) != 0)
                        IterateClose();
-               }
        }
 
        return B_OK;
@@ -119,12 +119,15 @@ BShapeIterator::IterateArcTo(float& rx, float& ry, float& 
angle, bool largeArc,
 }
 
 
+// #pragma mark - BShapeIterator FBC padding
+
+
 void BShapeIterator::_ReservedShapeIterator2() {}
 void BShapeIterator::_ReservedShapeIterator3() {}
 void BShapeIterator::_ReservedShapeIterator4() {}
 
 
-// #pragma mark -
+// #pragma mark - BShape
 
 
 BShape::BShape()
@@ -133,15 +136,16 @@ BShape::BShape()
 }
 
 
-BShape::BShape(const BShape &copyFrom)
+BShape::BShape(const BShape& other)
 {
        InitData();
-       AddShape(&copyFrom);
+       AddShape(&other);
 }
 
 
 BShape::BShape(BMessage* archive)
-       :       BArchivable(archive)
+       :
+       BArchivable(archive)
 {
        InitData();
 
@@ -156,8 +160,10 @@ BShape::BShape(BMessage* archive)
 
        int32 i = 0;
        const uint32* opPtr;
-       while (archive->FindData("ops", B_INT32_TYPE, i++, (const 
void**)&opPtr, &size) == B_OK)
+       while (archive->FindData("ops", B_INT32_TYPE, i++,
+                       (const void**)&opPtr, &size) == B_OK) {
                data->opList[data->opCount++] = *opPtr;
+       }
 
        archive->GetInfo("pts", &type, &count);
        if (!AllocatePts(count)) {
@@ -167,8 +173,10 @@ BShape::BShape(BMessage* archive)
 
        i = 0;
        const BPoint* ptPtr;
-       while (archive->FindData("pts", B_POINT_TYPE, i++, (const 
void**)&ptPtr, &size) == B_OK)
+       while (archive->FindData("pts", B_POINT_TYPE, i++,
+                       (const void**)&ptPtr, &size) == B_OK) {
                data->ptList[data->ptCount++] = *ptPtr;
+       }
 }
 
 
@@ -186,35 +194,36 @@ BShape::~BShape()
 status_t
 BShape::Archive(BMessage* archive, bool deep) const
 {
-       status_t err = BArchivable::Archive(archive, deep);
+       status_t result = BArchivable::Archive(archive, deep);
 
-       if (err != B_OK)
-               return err;
+       if (result != B_OK)
+               return result;
 
        shape_data* data = (shape_data*)fPrivateData;
 
        // If no valid shape data, return
        if (data->opCount == 0 || data->ptCount == 0)
-               return err;
+               return result;
 
        // Avoids allocation for each point
-       err = archive->AddData("pts", B_POINT_TYPE, data->ptList, 
sizeof(BPoint), true,
-               data->ptCount);
-       if (err != B_OK)
-               return err;
+       result = archive->AddData("pts", B_POINT_TYPE, data->ptList,
+               sizeof(BPoint), true, data->ptCount);
+       if (result != B_OK)
+               return result;
 
-       for (int32 i = 1; i < data->ptCount && err == B_OK; i++)
-               err = archive->AddPoint("pts", data->ptList[i]);
+       for (int32 i = 1; i < data->ptCount && result == B_OK; i++)
+               result = archive->AddPoint("pts", data->ptList[i]);
 
        // Avoids allocation for each op
-       if (err == B_OK)
-               err = archive->AddData("ops", B_INT32_TYPE, data->opList, 
sizeof(int32), true,
-                       data->opCount);
+       if (result == B_OK) {
+               result = archive->AddData("ops", B_INT32_TYPE, data->opList,
+                       sizeof(int32), true, data->opCount);
+       }
 
-       for (int32 i = 1; i < data->opCount && err == B_OK ; i++)
-               err = archive->AddInt32("ops", data->opList[i]);
+       for (int32 i = 1; i < data->opCount && result == B_OK; i++)
+               result = archive->AddInt32("ops", data->opList[i]);
 
-       return err;
+       return result;
 }
 
 
@@ -251,6 +260,7 @@ BShape::operator==(const BShape& other) const
 
        if (data->opCount != otherData->opCount)
                return false;
+
        if (data->ptCount != otherData->ptCount)
                return false;
 
@@ -310,10 +320,13 @@ BShape::Bounds() const
        for (int32 i = 1; i < data->ptCount; i++) {
                if (bounds.left > data->ptList[i].x)
                        bounds.left = data->ptList[i].x;
+
                if (bounds.top > data->ptList[i].y)
                        bounds.top = data->ptList[i].y;
+
                if (bounds.right < data->ptList[i].x)
                        bounds.right = data->ptList[i].x;
+
                if (bounds.bottom < data->ptList[i].y)
                        bounds.bottom = data->ptList[i].y;
        }
@@ -401,6 +414,7 @@ BShape::LineTo(BPoint point)
        } else {
                if (!AllocateOps(1))
                        return B_NO_MEMORY;
+
                fBuildingOp = OP_LINETO + 1;
                data->opList[data->opCount++] = fBuildingOp;
        }
@@ -483,6 +497,7 @@ BShape::ArcTo(float rx, float ry, float angle, bool 
largeArc,
        } else {
                if (!AllocateOps(1))
                        return B_NO_MEMORY;
+
                fBuildingOp = op + 3;
                data->opList[data->opCount++] = fBuildingOp;
        }
@@ -523,19 +538,28 @@ BShape::Close()
 }
 
 
+//     #pragma mark - BShape private methods
+
+
 status_t
-BShape::Perform(perform_code d, void* arg)
+BShape::Perform(perform_code code, void* data)
 {
-       return BArchivable::Perform(d, arg);
+       return BArchivable::Perform(code, data);
 }
 
 
+//     #pragma mark - BShape FBC methods
+
+
 void BShape::_ReservedShape1() {}
 void BShape::_ReservedShape2() {}
 void BShape::_ReservedShape3() {}
 void BShape::_ReservedShape4() {}
 
 
+//     #pragma mark - BShape private methods
+
+
 void
 BShape::GetData(int32* opCount, int32* ptCount, uint32** opList,
        BPoint** ptList)
@@ -551,7 +575,7 @@ BShape::GetData(int32* opCount, int32* ptCount, uint32** 
opList,
 
 void
 BShape::SetData(int32 opCount, int32 ptCount, const uint32* opList,
-                               const BPoint* ptList)
+       const BPoint* ptList)
 {
        Clear();
 
@@ -574,8 +598,6 @@ BShape::SetData(int32 opCount, int32 ptCount, const uint32* 
opList,
 }
 
 
-
-
 void
 BShape::InitData()
 {
@@ -632,7 +654,7 @@ BShape::AllocatePts(int32 count)
 }
 
 
-//     #pragma mark - binary compatibility
+//     #pragma mark - BShape binary compatibility methods
 
 
 #if __GNUC__ < 3

############################################################################

Revision:    hrev47496
Commit:      cb65c3a0378d10d3e053772f8c15bc2fe95a844b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=cb65c3a
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Jul 14 23:03:20 2014 UTC

Document BShape and BShapeIterator

----------------------------------------------------------------------------

diff --git a/docs/user/interface/Shape.dox b/docs/user/interface/Shape.dox
new file mode 100644
index 0000000..80231d8
--- /dev/null
+++ b/docs/user/interface/Shape.dox
@@ -0,0 +1,459 @@
+/*
+ * Copyright 2003-2014 Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ * Authors:
+ *             Marc Flerackers, mflerackers@xxxxxxxxxx
+ *             John Scipione, jscipione@xxxxxxxxx
+ *
+ * Corresponds to:
+ *             headers/os/interface/Shape.h     hrev47496
+ *             src/kits/interface/Shape.cpp     hrev47496
+ */
+
+
+/*!
+       \file Shape.h
+       \ingroup interface
+       \ingroup libbe
+       \brief BShape and BShapeIterator class definitions.
+*/
+
+
+/*!
+       \class BShapeIterator
+       \ingroup interface
+       \ingroup libbe
+       \brief Allows you to iterate through BShape operations.
+
+       You should override this class and implement the IterateMoveTo(),
+       IterateLineTo(), IterateBezierTo(), IterateClose(), and IterateArcTo()
+       methods which correspond to BShape::MoveTo(), BShape::LineTo(),
+       BShape::BezierTo(), BShape::Close() and BShape::ArcTo() respectively.
+
+       \sa BShape
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShapeIterator::BShapeIterator()
+       \brief Constructor, does nothing.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShapeIterator::~BShapeIterator()
+       \brief Destructor, does nothing.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::Iterate(BShape* shape)
+       \brief Iterates over each operation that make up the BShape calling
+              IterateMoveTo(), IterateLineTo(), IterateBezierTo(),
+              IterateClose() or IterateArcTo() depending on the operation.
+
+       \brief shape The BShape object to iterate through.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::IterateMoveTo(BPoint* point)
+       \brief Called by Iterate() to act on \a point.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \param point The point to act on.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::IterateLineTo(int32 lineCount,
+               BPoint* linePoints)
+       \brief Called by Iterate() to act on \a lineCount lines comprised of the
+              points specified by \a linePoints.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \param lineCount The number of points in \a linePoints.
+       \param linePoints The list of points of lines to act on.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::IterateBezierTo(int32 bezierCount,
+               BPoint* bezierPoints)
+       \brief Called by Iterate() to act on \a bezierCount Bézier curves
+              comprised of the points specified by \a bezierPoints.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \param bezierCount The number of points in \a bezierPoints.
+       \param bezierPoints The list of Bézier curve points to act on.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::IterateClose()
+       \brief Called by Iterate() to close the BShape.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShapeIterator::IterateArcTo(float& rx, float& ry,
+               float& angle, bool largeArc, bool counterClockWise, BPoint& 
point)
+       \brief Called by Iterate() to act on an arc.
+
+       \param rx The horizontal radius of the arc to act on.
+       \param ry The vertical radius of the arc to act on.
+       \param angle The starting angle of the arc in degrees to act on.
+       \param largeArc Whether or not to draw a large arc.
+       \param counterClockWise \c true if the arc is drawn counter-clockwise, 
\c false
+              if the arc is drawn clockwise.
+       \param point The center point of the arc to act on.
+
+       This method does nothing and should be implemented by derived classes.
+
+       \return Always returns \c B_OK. You should override this method
+               to return an appropriate status code.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \class BShape
+       \ingroup interface
+       \ingroup libbe
+       \brief Encapsulates a Postscript-style "path".
+
+       You can obtain the outlines of characters from a string as BShape 
objects
+       by calling BFont::GetGlyphShapes().
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShape::BShape()
+       \brief Creates an empty BShape object.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShape::BShape(const BShape& other)
+       \brief Creates a new BShape object as a copy of \a other.
+
+       \param other The BShape object to copy from.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShape::BShape(BMessage* archive)
+       \brief Creates a new BShape message from an \a archive message.
+
+       You should call Instantiate() instead as it will validate whether
+       or not the object was created successfully.
+
+       \param archive The BMessage object to construct the data from.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BShape::~BShape()
+       \brief Destructor, deletes all associated data.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \name Archiving
+*/
+
+
+//! @{
+
+
+/*!
+       \fn status_t BShape::Archive(BMessage* archive, bool deep) const
+       \brief Archives the BShape object to a BMessage.
+
+       \param archive The BMessage object to archive the BShape data to.
+       \param deep Currently unused.
+
+       \return A status code, \c B_OK on scucess or an error code otherwise.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BArchivable* BShape::Instantiate(BMessage* archive)
+       \brief Creates a new BShape object from an \a archive message.
+
+       \param archive The BMessage object to construct the BShape data from.
+
+       \return A new BShape object or \c NULL if \a archive was invalid.
+
+       \since BeOS R4
+*/
+
+
+//! @}
+
+
+/*!
+       \name Operators
+*/
+
+
+//! @{
+
+
+/*!
+       \fn BShape& BShape::operator=(const BShape& other)
+       \brief Constructs a BShape object as a copy of \a other by overloading
+              the = operator.
+
+       \param other The BShape object to copy from.
+
+       \brief Always returns *this.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \fn bool BShape::operator==(const BShape& other) const
+       \brief Returns whether or not the contents of this BShape and \a other
+              contain the same data.
+
+       \return \c true if the contents are equal, \c false otherwise.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \fn bool BShape::operator!=(const BShape& other) const
+       \brief Returns whether or not the contents of this BShape and \a other
+              do NOT contain the same data.
+
+       \return \c true if the contents are NOT equal, \c false otherwise.
+
+       \since Haiku R1
+*/
+
+
+//! @}
+
+
+/*!
+       \fn void BShape::Clear()
+       \brief Deletes all data returning the BShape to an empty state.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BRect BShape::Bounds() const
+       \brief Returns a BRect that encloses all points in the BShape.
+
+       \warning This implementation doesn't take into account curves at all.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn BPoint BShape::CurrentPosition() const
+       \brief Returns the current end point of the path.
+
+       \return The current end point of the path or \c B_ORIGIN if no points 
have
+               been added yet.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \fn status_t BShape::AddShape(const BShape* otherShape)
+       \brief Adds the lines and curves of \a otherShape to BShape.
+
+       \return Always returns \c B_OK.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \name Operations
+*/
+
+
+//! @{
+
+
+/*!
+       \fn status_t BShape::MoveTo(BPoint point)
+       \brief Adds a "move to" operation to the BShape.
+
+       The next LineTo() or BezierTo() will begin at \a point allowing you to
+       create noncontiguous shapes.
+
+       \param point The point to start the next LineTo() or BezierTo() at.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShape::LineTo(BPoint point)
+       \brief Adds a "draw line" operation to the BShape.
+
+       A line will be drawn from the previous point to the \a point specified.
+
+       \param point The point to draw a line to starting at the previous 
location.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShape::BezierTo(BPoint controlPoints[3])
+       \brief Adds a "draw Bézier curve" operation to the BShape.
+
+       A Bézier curve is drawn that begins at the current point and is made up
+       of the specified \a controlPoints.
+
+       \param controlPoints The points that make up the Bézier curve.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since BeOS R4
+*/
+
+
+/*!
+       \fn status_t BShape::BezierTo(const BPoint& control1,
+               const BPoint& control2, const BPoint& endPoint)
+       \brief Adds a "draw Bézier curve" operation to the BShape.
+
+       A Bézier curve is drawn that begins at the current point and is made up
+       of the specified points.
+
+       \param control1 The first control point of the Bézier curve.
+       \param control2 The second control point of the Bézier curve.
+       \param endPoint The end point of the Bézier curve.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \fn status_t BShape::ArcTo(float rx, float ry, float angle, bool 
largeArc,
+               bool counterClockWise, const BPoint& point)
+       \brief Adds a "draw arc" operation to the BShape.
+
+       An arc is draw that begins at the current point and is specified by the
+       parameters to this method.
+
+       \param rx The horizontal radius of the arc.
+       \param ry The vertical radius of the arc.
+       \param angle The starting angle of the arc in degrees.
+       \param largeArc Whether or not to draw a large arc.
+       \param counterClockWise \c true to draw the arc counter-clockwise, \c 
false
+              to draw the arc clockwise.
+       \param point The center point of the arc.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since Haiku R1
+*/
+
+
+/*!
+       \fn status_t BShape::Close()
+       \brief Adds an operation to close the BShape once it is fully 
constructed.
+
+       \return Returns a status code, \c B_OK on success or an error code
+              otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \return Returns a status code, \c B_OK on success or an error code
+               otherwise.
+       \retval B_OK The operation was added successfully.
+       \retval B_NO_MEMORY Ran out of memory while trying to add the operation.
+
+       \since BeOS R4
+*/
+
+
+//! @}
\ No newline at end of file


Other related posts:

  • » [haiku-commits] haiku: hrev47496 - docs/user/interface src/kits/interface headers/os/interface - jscipione