зеркало из https://github.com/mozilla/gecko-dev.git
Bug 499377 addendum - Complete nsMargin arithmetic for nsRect r=roc
This commit is contained in:
Родитель
1816bcdd46
Коммит
bcc6e7c37a
|
@ -172,10 +172,11 @@ struct NS_GFX nsRect {
|
|||
nsRect& operator-=(const nsPoint& aPoint) {x -= aPoint.x; y -= aPoint.y; return *this;}
|
||||
|
||||
// Arithmetic with nsMargins
|
||||
/**
|
||||
* Return nsMargin m such that if m = rectA - rectB, rectB.Inflate(m) == rectA
|
||||
*/
|
||||
nsMargin operator-(const nsRect& aRect) const;
|
||||
nsMargin operator-(const nsRect& aRect) const; // Find difference as nsMargin
|
||||
nsRect& operator+=(const nsMargin& aMargin) { Inflate(aMargin); return *this; }
|
||||
nsRect& operator-=(const nsMargin& aMargin) { Deflate(aMargin); return *this; }
|
||||
nsRect operator+(const nsMargin& aMargin) const { return nsRect(*this) += aMargin; }
|
||||
nsRect operator-(const nsMargin& aMargin) const { return nsRect(*this) -= aMargin; }
|
||||
|
||||
// Scale by aScale, converting coordinates to integers so that the result
|
||||
// is the smallest integer-coordinate rectangle containing the unrounded result
|
||||
|
|
Загрузка…
Ссылка в новой задаче