BRegion: add ScaleBy(BSize) and user documentation.

This commit is contained in:
Adrien Destugues 2014-06-19 18:40:29 +02:00
parent 9576c4b742
commit 33d60fa21f
3 changed files with 31 additions and 0 deletions

View File

@ -332,6 +332,29 @@
*/
/*!
\fn void BRegion::ScaleBy(BSize scale)
\brief Resize each of the contained rectangles by the given factor
and recalculates the region's bounds.
\param scale The scale factor
\since Haiku R1
*/
/*!
\fn void BRegion::ScaleBy(float x, float y)
\brief Resize each of the contained rectangles by the given factors
and recalculates the region's bounds.
\param x The horizontal scale.
\param y The vertical scale.
\since Haiku R1
*/
/*!
\fn void BRegion::MakeEmpty()
\brief Empties the region so that it doesn't containt any rects, and

View File

@ -59,6 +59,7 @@ public:
void OffsetBy(const BPoint& point);
void OffsetBy(int32 x, int32 y);
void ScaleBy(BSize scale);
void ScaleBy(float x, float y);
void MakeEmpty();

View File

@ -306,6 +306,13 @@ BRegion::OffsetBy(int32 x, int32 y)
}
void
BRegion::ScaleBy(BSize scale)
{
ScaleBy(scale.Width(), scale.Height());
}
void
BRegion::ScaleBy(float x, float y)
{