BRect: Style fixes for documentation

This commit is contained in:
John Scipione
2014-05-30 19:31:10 -04:00
parent e0405a5615
commit 1f46fc6d52
2 changed files with 60 additions and 60 deletions
+33 -33
View File
@@ -38,10 +38,10 @@ public:
BPoint LeftBottom() const; BPoint LeftBottom() const;
BPoint RightTop() const; BPoint RightTop() const;
void SetLeftTop(const BPoint leftTop); void SetLeftTop(const BPoint point);
void SetRightBottom(const BPoint rightBottom); void SetRightBottom(const BPoint point);
void SetLeftBottom(const BPoint leftBottom); void SetLeftBottom(const BPoint point);
void SetRightTop(const BPoint rightTop); void SetRightTop(const BPoint point);
// Transformation // Transformation
void InsetBy(BPoint inset); void InsetBy(BPoint inset);
@@ -61,17 +61,17 @@ public:
BRect OffsetByCopy(BPoint offset) const; BRect OffsetByCopy(BPoint offset) const;
BRect OffsetByCopy(float dx, float dy) const; BRect OffsetByCopy(float dx, float dy) const;
BRect& OffsetToSelf(BPoint offset); BRect& OffsetToSelf(BPoint offset);
BRect& OffsetToSelf(float dx, float dy); BRect& OffsetToSelf(float x, float y);
BRect OffsetToCopy(BPoint offset) const; BRect OffsetToCopy(BPoint offset) const;
BRect OffsetToCopy(float dx, float dy) const; BRect OffsetToCopy(float x, float y) const;
// Comparison // Comparison
bool operator==(BRect r) const; bool operator==(BRect other) const;
bool operator!=(BRect r) const; bool operator!=(BRect other) const;
// Intersection and union // Intersection and union
BRect operator&(BRect r) const; BRect operator&(BRect other) const;
BRect operator|(BRect r) const; BRect operator|(BRect other) const;
bool IsValid() const; bool IsValid() const;
float Width() const; float Width() const;
@@ -80,9 +80,9 @@ public:
int32 IntegerHeight() const; int32 IntegerHeight() const;
BSize Size() const; BSize Size() const;
bool Intersects(BRect r) const; bool Intersects(BRect rect) const;
bool Contains(BPoint p) const; bool Contains(BPoint point) const;
bool Contains(BRect r) const; bool Contains(BRect rect) const;
}; };
@@ -128,23 +128,23 @@ BRect::BRect()
inline inline
BRect::BRect(float l, float t, float r, float b) BRect::BRect(float left, float top, float right, float bottom)
: :
left(l), left(left),
top(t), top(top),
right(r), right(right),
bottom(b) bottom(bottom)
{ {
} }
inline inline
BRect::BRect(const BRect& r) BRect::BRect(const BRect& other)
: :
left(r.left), left(other.left),
top(r.top), top(other.top),
right(r.right), right(other.right),
bottom(r.bottom) bottom(other.bottom)
{ {
} }
@@ -183,23 +183,23 @@ BRect::BRect(float side)
inline BRect& inline BRect&
BRect::operator=(const BRect& from) BRect::operator=(const BRect& other)
{ {
left = from.left; left = other.left;
top = from.top; top = other.top;
right = from.right; right = other.right;
bottom = from.bottom; bottom = other.bottom;
return *this; return *this;
} }
inline void inline void
BRect::Set(float l, float t, float r, float b) BRect::Set(float left, float top, float right, float bottom)
{ {
left = l; this->left = left;
top = t; this->top = top;
right = r; this->right = right;
bottom = b; this->bottom = bottom;
} }
+27 -27
View File
@@ -12,34 +12,34 @@
void void
BRect::SetLeftTop(const BPoint p) BRect::SetLeftTop(const BPoint point)
{ {
left = p.x; left = point.x;
top = p.y; top = point.y;
} }
void void
BRect::SetRightBottom(const BPoint p) BRect::SetRightBottom(const BPoint point)
{ {
right = p.x; right = point.x;
bottom = p.y; bottom = point.y;
} }
void void
BRect::SetLeftBottom(const BPoint p) BRect::SetLeftBottom(const BPoint point)
{ {
left = p.x; left = point.x;
bottom = p.y; bottom = point.y;
} }
void void
BRect::SetRightTop(const BPoint p) BRect::SetRightTop(const BPoint point)
{ {
right = p.x; right = point.x;
top = p.y; top = point.y;
} }
@@ -180,9 +180,9 @@ BRect::OffsetToSelf(BPoint point)
BRect& BRect&
BRect::OffsetToSelf(float dx, float dy) BRect::OffsetToSelf(float x, float y)
{ {
OffsetTo(dx, dy); OffsetTo(x, y);
return *this; return *this;
} }
@@ -197,10 +197,10 @@ BRect::OffsetToCopy(BPoint point) const
BRect BRect
BRect::OffsetToCopy(float dx, float dy) const BRect::OffsetToCopy(float x, float y) const
{ {
BRect copy(*this); BRect copy(*this);
copy.OffsetTo(dx, dy); copy.OffsetTo(x, y);
return copy; return copy;
} }
@@ -213,33 +213,33 @@ BRect::PrintToStream() const
bool bool
BRect::operator==(BRect rect) const BRect::operator==(BRect other) const
{ {
return left == rect.left && right == rect.right && return left == other.left && right == other.right &&
top == rect.top && bottom == rect.bottom; top == other.top && bottom == other.bottom;
} }
bool bool
BRect::operator!=(BRect rect) const BRect::operator!=(BRect other) const
{ {
return !(*this == rect); return !(*this == other);
} }
BRect BRect
BRect::operator&(BRect rect) const BRect::operator&(BRect other) const
{ {
return BRect(max_c(left, rect.left), max_c(top, rect.top), return BRect(max_c(left, other.left), max_c(top, other.top),
min_c(right, rect.right), min_c(bottom, rect.bottom)); min_c(right, other.right), min_c(bottom, other.bottom));
} }
BRect BRect
BRect::operator|(BRect rect) const BRect::operator|(BRect other) const
{ {
return BRect(min_c(left, rect.left), min_c(top, rect.top), return BRect(min_c(left, other.left), min_c(top, other.top),
max_c(right, rect.right), max_c(bottom, rect.bottom)); max_c(right, other.right), max_c(bottom, other.bottom));
} }