summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_coords.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_coords.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_coords.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/core/src/fxcrt/fx_basic_coords.cpp b/core/src/fxcrt/fx_basic_coords.cpp
index 22b9bd4715..2e830809b8 100644
--- a/core/src/fxcrt/fx_basic_coords.cpp
+++ b/core/src/fxcrt/fx_basic_coords.cpp
@@ -45,15 +45,15 @@ void FX_RECT::Union(const FX_RECT& other_rect)
bottom = bottom > other.bottom ? bottom : other.bottom;
top = top < other.top ? top : other.top;
}
-bool GetIntersection(FX_FLOAT low1, FX_FLOAT high1, FX_FLOAT low2, FX_FLOAT high2,
+FX_BOOL GetIntersection(FX_FLOAT low1, FX_FLOAT high1, FX_FLOAT low2, FX_FLOAT high2,
FX_FLOAT& interlow, FX_FLOAT& interhigh)
{
if (low1 >= high2 || low2 >= high1) {
- return false;
+ return FALSE;
}
interlow = low1 > low2 ? low1 : low2;
interhigh = high1 > high2 ? high2 : high1;
- return true;
+ return TRUE;
}
extern "C" int FXSYS_round(FX_FLOAT d)
{
@@ -198,18 +198,18 @@ FX_RECT CFX_FloatRect::GetClosestRect() const
rect.Normalize();
return rect;
}
-bool CFX_FloatRect::Contains(const CFX_FloatRect& other_rect) const
+FX_BOOL CFX_FloatRect::Contains(const CFX_FloatRect& other_rect) const
{
CFX_FloatRect n1 = *this;
n1.Normalize();
CFX_FloatRect n2 = other_rect;
n2.Normalize();
if (n2.left >= n1.left && n2.right <= n1.right && n2.bottom >= n1.bottom && n2.top <= n1.top) {
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFX_FloatRect::Contains(FX_FLOAT x, FX_FLOAT y) const
+FX_BOOL CFX_FloatRect::Contains(FX_FLOAT x, FX_FLOAT y) const
{
CFX_FloatRect n1 = *this;
n1.Normalize();
@@ -299,13 +299,13 @@ static void FXCRT_Matrix_Concat(CFX_Matrix &m, const CFX_Matrix &m1, const CFX_M
FX_FLOAT ff = m1.e * m2.b + m1.f * m2.d + m2.f;
m.a = aa, m.b = bb, m.c = cc, m.d = dd, m.e = ee, m.f = ff;
}
-void CFX_Matrix::Concat(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, bool bPrepended)
+void CFX_Matrix::Concat(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, FX_BOOL bPrepended)
{
CFX_Matrix m;
m.Set(a, b, c, d, e, f);
Concat(m, bPrepended);
}
-void CFX_Matrix::Concat(const CFX_Matrix &m, bool bPrepended)
+void CFX_Matrix::Concat(const CFX_Matrix &m, FX_BOOL bPrepended)
{
if (bPrepended) {
FXCRT_Matrix_Concat(*this, m, *this);
@@ -313,25 +313,25 @@ void CFX_Matrix::Concat(const CFX_Matrix &m, bool bPrepended)
FXCRT_Matrix_Concat(*this, *this, m);
}
}
-void CFX_Matrix::ConcatInverse(const CFX_Matrix& src, bool bPrepended)
+void CFX_Matrix::ConcatInverse(const CFX_Matrix& src, FX_BOOL bPrepended)
{
CFX_Matrix m;
m.SetReverse(src);
Concat(m, bPrepended);
}
-bool CFX_Matrix::IsInvertible() const
+FX_BOOL CFX_Matrix::IsInvertible() const
{
return FXSYS_fabs(a * d - b * c) >= 0.0001f;
}
-bool CFX_Matrix::Is90Rotated() const
+FX_BOOL CFX_Matrix::Is90Rotated() const
{
return FXSYS_fabs(a * 1000) < FXSYS_fabs(b) && FXSYS_fabs(d * 1000) < FXSYS_fabs(c);
}
-bool CFX_Matrix::IsScaled() const
+FX_BOOL CFX_Matrix::IsScaled() const
{
return FXSYS_fabs(b * 1000) < FXSYS_fabs(a) && FXSYS_fabs(c * 1000) < FXSYS_fabs(d);
}
-void CFX_Matrix::Translate(FX_FLOAT x, FX_FLOAT y, bool bPrepended)
+void CFX_Matrix::Translate(FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended)
{
if (bPrepended) {
e += x * a + y * c;
@@ -340,7 +340,7 @@ void CFX_Matrix::Translate(FX_FLOAT x, FX_FLOAT y, bool bPrepended)
e += x, f += y;
}
}
-void CFX_Matrix::Scale(FX_FLOAT sx, FX_FLOAT sy, bool bPrepended)
+void CFX_Matrix::Scale(FX_FLOAT sx, FX_FLOAT sy, FX_BOOL bPrepended)
{
a *= sx, d *= sy;
if (bPrepended) {
@@ -353,7 +353,7 @@ void CFX_Matrix::Scale(FX_FLOAT sx, FX_FLOAT sy, bool bPrepended)
f *= sy;
}
}
-void CFX_Matrix::Rotate(FX_FLOAT fRadian, bool bPrepended)
+void CFX_Matrix::Rotate(FX_FLOAT fRadian, FX_BOOL bPrepended)
{
FX_FLOAT cosValue = FXSYS_cos(fRadian);
FX_FLOAT sinValue = FXSYS_sin(fRadian);
@@ -365,13 +365,13 @@ void CFX_Matrix::Rotate(FX_FLOAT fRadian, bool bPrepended)
FXCRT_Matrix_Concat(*this, *this, m);
}
}
-void CFX_Matrix::RotateAt(FX_FLOAT fRadian, FX_FLOAT dx, FX_FLOAT dy, bool bPrepended)
+void CFX_Matrix::RotateAt(FX_FLOAT fRadian, FX_FLOAT dx, FX_FLOAT dy, FX_BOOL bPrepended)
{
Translate(dx, dy, bPrepended);
Rotate(fRadian, bPrepended);
Translate(-dx, -dy, bPrepended);
}
-void CFX_Matrix::Shear(FX_FLOAT fAlphaRadian, FX_FLOAT fBetaRadian, bool bPrepended)
+void CFX_Matrix::Shear(FX_FLOAT fAlphaRadian, FX_FLOAT fBetaRadian, FX_BOOL bPrepended)
{
CFX_Matrix m;
m.Set(1, FXSYS_tan(fAlphaRadian), FXSYS_tan(fBetaRadian), 1, 0, 0);