Source cleaning: whitespaces, tabs, -1/wxDefaultCoord/wxID_ANY/wxNOT_FOUND, TRUE/true, FALSE/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-17 22:23:59 +00:00
parent 600902562d
commit 4e32eea148
15 changed files with 123 additions and 123 deletions

View File

@@ -33,7 +33,7 @@ static const double pi = 3.1415926535;
wxTransformMatrix::wxTransformMatrix(void)
{
m_isIdentity = FALSE;
m_isIdentity = false;
Identity();
}
@@ -76,8 +76,8 @@ void wxTransformMatrix::operator = (const wxTransformMatrix& mat)
bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
{
if (m_isIdentity==TRUE && mat.m_isIdentity==TRUE)
return TRUE;
if (m_isIdentity==true && mat.m_isIdentity==true)
return true;
int i, j;
for (i = 0; i < 3; i++)
@@ -85,10 +85,10 @@ bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
for (j = 0; j < 3; j++)
{
if (m_matrix[i][j] != mat.m_matrix[i][j])
return FALSE;
return false;
}
}
return TRUE;
return true;
}
bool wxTransformMatrix::operator != (const wxTransformMatrix& mat)
@@ -147,11 +147,11 @@ bool wxTransformMatrix::Invert(void)
}
}
m_isIdentity = IsIdentity1();
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}
@@ -160,9 +160,9 @@ bool wxTransformMatrix::Identity(void)
{
m_matrix[0][0] = m_matrix[1][1] = m_matrix[2][2] = 1.0;
m_matrix[1][0] = m_matrix[2][0] = m_matrix[0][1] = m_matrix[2][1] = m_matrix[0][2] = m_matrix[1][2] = 0.0;
m_isIdentity = TRUE;
m_isIdentity = true;
return TRUE;
return true;
}
// Scale by scale (isotropic scaling i.e. the same in x and y):
@@ -182,7 +182,7 @@ bool wxTransformMatrix::Scale(double scale)
}
m_isIdentity = IsIdentity1();
return TRUE;
return true;
}
@@ -268,12 +268,12 @@ wxTransformMatrix& wxTransformMatrix::Mirror(bool x, bool y)
if (x)
{
temp.m_matrix[1][1] = -1;
temp.m_isIdentity=FALSE;
temp.m_isIdentity=false;
}
if (y)
{
temp.m_matrix[0][0] = -1;
temp.m_isIdentity=FALSE;
temp.m_isIdentity=false;
}
*this = temp * (*this);
@@ -296,7 +296,7 @@ bool wxTransformMatrix::Translate(double dx, double dy)
m_isIdentity = IsIdentity1();
return TRUE;
return true;
}
// Rotate clockwise by the given number of degrees:
@@ -306,7 +306,7 @@ bool wxTransformMatrix::Translate(double dx, double dy)
bool wxTransformMatrix::Rotate(double degrees)
{
Rotate(-degrees,0,0);
return TRUE;
return true;
}
// counter clockwise rotate around a point
@@ -384,13 +384,13 @@ bool wxTransformMatrix::TransformPoint(double x, double y, double& tx, double& t
{
if (IsIdentity())
{
tx = x; ty = y; return TRUE;
tx = x; ty = y; return true;
}
tx = x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0];
ty = x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1];
return TRUE;
return true;
}
// Transform a point from device to logical coordinates.
@@ -407,18 +407,18 @@ bool wxTransformMatrix::InverseTransformPoint(double x, double y, double& tx, do
{
if (IsIdentity())
{
tx = x; ty = y; return TRUE;
tx = x; ty = y; return true;
}
double z = (1.0 - m_matrix[0][2] * x - m_matrix[1][2] * y) / m_matrix[2][2];
if (z == 0.0)
{
// z = 0.0000001;
return FALSE;
return false;
}
tx = x * m_matrix[0][0] + y * m_matrix[1][0] + z * m_matrix[2][0];
ty = x * m_matrix[0][1] + y * m_matrix[1][1] + z * m_matrix[2][1];
return TRUE;
return true;
}
wxTransformMatrix& wxTransformMatrix::operator*=(const double& t)