BRect: Style fixes for documentation
This commit is contained in:
parent
e0405a5615
commit
1f46fc6d52
@ -38,10 +38,10 @@ public:
|
||||
BPoint LeftBottom() const;
|
||||
BPoint RightTop() const;
|
||||
|
||||
void SetLeftTop(const BPoint leftTop);
|
||||
void SetRightBottom(const BPoint rightBottom);
|
||||
void SetLeftBottom(const BPoint leftBottom);
|
||||
void SetRightTop(const BPoint rightTop);
|
||||
void SetLeftTop(const BPoint point);
|
||||
void SetRightBottom(const BPoint point);
|
||||
void SetLeftBottom(const BPoint point);
|
||||
void SetRightTop(const BPoint point);
|
||||
|
||||
// Transformation
|
||||
void InsetBy(BPoint inset);
|
||||
@ -61,17 +61,17 @@ public:
|
||||
BRect OffsetByCopy(BPoint offset) const;
|
||||
BRect OffsetByCopy(float dx, float dy) const;
|
||||
BRect& OffsetToSelf(BPoint offset);
|
||||
BRect& OffsetToSelf(float dx, float dy);
|
||||
BRect& OffsetToSelf(float x, float y);
|
||||
BRect OffsetToCopy(BPoint offset) const;
|
||||
BRect OffsetToCopy(float dx, float dy) const;
|
||||
BRect OffsetToCopy(float x, float y) const;
|
||||
|
||||
// Comparison
|
||||
bool operator==(BRect r) const;
|
||||
bool operator!=(BRect r) const;
|
||||
bool operator==(BRect other) const;
|
||||
bool operator!=(BRect other) const;
|
||||
|
||||
// Intersection and union
|
||||
BRect operator&(BRect r) const;
|
||||
BRect operator|(BRect r) const;
|
||||
BRect operator&(BRect other) const;
|
||||
BRect operator|(BRect other) const;
|
||||
|
||||
bool IsValid() const;
|
||||
float Width() const;
|
||||
@ -80,9 +80,9 @@ public:
|
||||
int32 IntegerHeight() const;
|
||||
BSize Size() const;
|
||||
|
||||
bool Intersects(BRect r) const;
|
||||
bool Contains(BPoint p) const;
|
||||
bool Contains(BRect r) const;
|
||||
bool Intersects(BRect rect) const;
|
||||
bool Contains(BPoint point) const;
|
||||
bool Contains(BRect rect) const;
|
||||
};
|
||||
|
||||
|
||||
@ -128,23 +128,23 @@ BRect::BRect()
|
||||
|
||||
|
||||
inline
|
||||
BRect::BRect(float l, float t, float r, float b)
|
||||
BRect::BRect(float left, float top, float right, float bottom)
|
||||
:
|
||||
left(l),
|
||||
top(t),
|
||||
right(r),
|
||||
bottom(b)
|
||||
left(left),
|
||||
top(top),
|
||||
right(right),
|
||||
bottom(bottom)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
BRect::BRect(const BRect& r)
|
||||
BRect::BRect(const BRect& other)
|
||||
:
|
||||
left(r.left),
|
||||
top(r.top),
|
||||
right(r.right),
|
||||
bottom(r.bottom)
|
||||
left(other.left),
|
||||
top(other.top),
|
||||
right(other.right),
|
||||
bottom(other.bottom)
|
||||
{
|
||||
}
|
||||
|
||||
@ -183,23 +183,23 @@ BRect::BRect(float side)
|
||||
|
||||
|
||||
inline BRect&
|
||||
BRect::operator=(const BRect& from)
|
||||
BRect::operator=(const BRect& other)
|
||||
{
|
||||
left = from.left;
|
||||
top = from.top;
|
||||
right = from.right;
|
||||
bottom = from.bottom;
|
||||
left = other.left;
|
||||
top = other.top;
|
||||
right = other.right;
|
||||
bottom = other.bottom;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
inline void
|
||||
BRect::Set(float l, float t, float r, float b)
|
||||
BRect::Set(float left, float top, float right, float bottom)
|
||||
{
|
||||
left = l;
|
||||
top = t;
|
||||
right = r;
|
||||
bottom = b;
|
||||
this->left = left;
|
||||
this->top = top;
|
||||
this->right = right;
|
||||
this->bottom = bottom;
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,34 +12,34 @@
|
||||
|
||||
|
||||
void
|
||||
BRect::SetLeftTop(const BPoint p)
|
||||
BRect::SetLeftTop(const BPoint point)
|
||||
{
|
||||
left = p.x;
|
||||
top = p.y;
|
||||
left = point.x;
|
||||
top = point.y;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BRect::SetRightBottom(const BPoint p)
|
||||
BRect::SetRightBottom(const BPoint point)
|
||||
{
|
||||
right = p.x;
|
||||
bottom = p.y;
|
||||
right = point.x;
|
||||
bottom = point.y;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BRect::SetLeftBottom(const BPoint p)
|
||||
BRect::SetLeftBottom(const BPoint point)
|
||||
{
|
||||
left = p.x;
|
||||
bottom = p.y;
|
||||
left = point.x;
|
||||
bottom = point.y;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BRect::SetRightTop(const BPoint p)
|
||||
BRect::SetRightTop(const BPoint point)
|
||||
{
|
||||
right = p.x;
|
||||
top = p.y;
|
||||
right = point.x;
|
||||
top = point.y;
|
||||
}
|
||||
|
||||
|
||||
@ -180,9 +180,9 @@ BRect::OffsetToSelf(BPoint point)
|
||||
|
||||
|
||||
BRect&
|
||||
BRect::OffsetToSelf(float dx, float dy)
|
||||
BRect::OffsetToSelf(float x, float y)
|
||||
{
|
||||
OffsetTo(dx, dy);
|
||||
OffsetTo(x, y);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -197,10 +197,10 @@ BRect::OffsetToCopy(BPoint point) const
|
||||
|
||||
|
||||
BRect
|
||||
BRect::OffsetToCopy(float dx, float dy) const
|
||||
BRect::OffsetToCopy(float x, float y) const
|
||||
{
|
||||
BRect copy(*this);
|
||||
copy.OffsetTo(dx, dy);
|
||||
copy.OffsetTo(x, y);
|
||||
return copy;
|
||||
}
|
||||
|
||||
@ -213,33 +213,33 @@ BRect::PrintToStream() const
|
||||
|
||||
|
||||
bool
|
||||
BRect::operator==(BRect rect) const
|
||||
BRect::operator==(BRect other) const
|
||||
{
|
||||
return left == rect.left && right == rect.right &&
|
||||
top == rect.top && bottom == rect.bottom;
|
||||
return left == other.left && right == other.right &&
|
||||
top == other.top && bottom == other.bottom;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BRect::operator!=(BRect rect) const
|
||||
BRect::operator!=(BRect other) const
|
||||
{
|
||||
return !(*this == rect);
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
|
||||
BRect
|
||||
BRect::operator&(BRect rect) const
|
||||
BRect::operator&(BRect other) const
|
||||
{
|
||||
return BRect(max_c(left, rect.left), max_c(top, rect.top),
|
||||
min_c(right, rect.right), min_c(bottom, rect.bottom));
|
||||
return BRect(max_c(left, other.left), max_c(top, other.top),
|
||||
min_c(right, other.right), min_c(bottom, other.bottom));
|
||||
}
|
||||
|
||||
|
||||
BRect
|
||||
BRect::operator|(BRect rect) const
|
||||
BRect::operator|(BRect other) const
|
||||
{
|
||||
return BRect(min_c(left, rect.left), min_c(top, rect.top),
|
||||
max_c(right, rect.right), max_c(bottom, rect.bottom));
|
||||
return BRect(min_c(left, other.left), min_c(top, other.top),
|
||||
max_c(right, other.right), max_c(bottom, other.bottom));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user