// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
wxDrawnShape::wxDrawnShape():wxRectangleShape(100.0, 50.0)
{
- m_saveToFile = TRUE;
+ m_saveToFile = true;
m_currentAngle = oglDRAWN_ANGLE_0;
}
wxDrawOp* op = (wxDrawOp*) node->GetData();
if (op->GetPerimeterPoint(x1, y1, x2, y2, x3, y3, GetX(), GetY(), GetAttachmentMode()))
- return TRUE;
+ return true;
}
// Default... just use a rectangle
double newX2 = m_x2*cosTheta - m_y2*sinTheta + x*(1.0 - cosTheta) + y*sinTheta;
double newY2 = m_x2*sinTheta + m_y2*cosTheta + y*(1.0 - cosTheta) + x*sinTheta;
- m_x1 = newX1;
- m_y1 = newY1;
- m_x2 = newX2;
- m_y2 = newY2;
+ m_x1 = newX1;
+ m_y1 = newY1;
+ m_x2 = newX2;
+ m_y2 = newY2;
break;
}
case DRAWOP_DRAW_RECT:
double newX3 = m_x3*cosTheta - m_y3*sinTheta + x*(1.0 - cosTheta) + y*sinTheta;
double newY3 = m_x3*sinTheta + m_y3*cosTheta + y*(1.0 - cosTheta) + x*sinTheta;
- m_x1 = newX1;
- m_y1 = newY1;
- m_x2 = newX2;
- m_y2 = newY2;
- m_x3 = newX3;
- m_y3 = newY3;
+ m_x1 = newX1;
+ m_y1 = newY1;
+ m_x2 = newX2;
+ m_y2 = newY2;
+ m_x3 = newX3;
+ m_y3 = newY3;
break;
}
}
dc.DrawPolygon(n, intPoints, (long) x, (long) y);
delete[] intPoints;
- return TRUE;
+ return true;
}
// Assume (x1, y1) is centre of box (most generally, line end at box)
{
*x3 = point->x + xOffset;
*y3 = point->y + yOffset;
- return TRUE;
+ return true;
}
else if ((y2 < y1) && (point->y < 0.0))
{
*x3 = point->x + xOffset;
*y3 = point->y + yOffset;
- return TRUE;
+ return true;
}
}
}
delete[] xpoints;
delete[] ypoints;
- return TRUE;
+ return true;
}
wxPseudoMetaFile::wxPseudoMetaFile()
{
m_currentRotation = 0;
- m_rotateable = TRUE;
+ m_rotateable = true;
m_width = 0.0;
m_height = 0.0;
m_outlinePen = NULL;
// Read GDI objects
wxChar buf[50];
int i = 1;
- bool keepGoing = TRUE;
+ bool keepGoing = true;
while (keepGoing)
{
wxSprintf(buf, _T("gdi%d_%d"), whichAngle, i);
clause->GetAttributeValue(buf, &expr);
if (!expr)
{
- keepGoing = FALSE;
+ keepGoing = false;
}
else
{
}
// Now read in the operations
- keepGoing = TRUE;
+ keepGoing = true;
i = 1;
while (keepGoing)
{
clause->GetAttributeValue(buf, &expr);
if (!expr)
{
- keepGoing = FALSE;
+ keepGoing = false;
}
else
{
bool wxPseudoMetaFile::LoadFromMetaFile(const wxString& filename, double *rwidth, double *rheight)
{
if (!wxFileExists(filename))
- return FALSE;
+ return false;
wxXMetaFile *metaFile = new wxXMetaFile;
if (!metaFile->ReadFile(filename))
{
delete metaFile;
- return FALSE;
+ return false;
}
double lastX = 0.0;
m_height = *rheight;
delete metaFile;
- return TRUE;
+ return true;
}
// Scale to fit size