зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1367870 - Add stringification helper for WrRect. r=jrmuizel
MozReview-Commit-ID: FMw6tPI2LOJ
This commit is contained in:
Родитель
cbaaff5376
Коммит
29bcb40e01
|
@ -69,6 +69,17 @@ AppendToString(std::stringstream& aStream, const nsRect& r,
|
|||
aStream << sfx;
|
||||
}
|
||||
|
||||
void
|
||||
AppendToString(std::stringstream& aStream, const WrRect& r,
|
||||
const char* pfx, const char* sfx)
|
||||
{
|
||||
aStream << pfx;
|
||||
aStream << nsPrintfCString(
|
||||
"(x=%f, y=%f, w=%f, h=%f)",
|
||||
r.x, r.y, r.width, r.height).get();
|
||||
aStream << sfx;
|
||||
}
|
||||
|
||||
void
|
||||
AppendToString(std::stringstream& aStream, const nsRegion& r,
|
||||
const char* pfx, const char* sfx)
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include "nsRegion.h" // for nsRegion, nsIntRegion
|
||||
#include "nscore.h" // for nsACString, etc
|
||||
|
||||
struct WrRect;
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
template <class units, class F> struct RectTyped;
|
||||
|
@ -87,6 +89,10 @@ AppendToString(std::stringstream& aStream, const mozilla::gfx::IntRectTyped<T>&
|
|||
aStream << sfx;
|
||||
}
|
||||
|
||||
void
|
||||
AppendToString(std::stringstream& aStream, const WrRect& r,
|
||||
const char* pfx="", const char* sfx="");
|
||||
|
||||
void
|
||||
AppendToString(std::stringstream& aStream, const nsRegion& r,
|
||||
const char* pfx="", const char* sfx="");
|
||||
|
|
Загрузка…
Ссылка в новой задаче