#ifdef __GNUG__
#pragma implementation "drawn.h"
+#pragma implementation "drawnp.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include <wx/wx.h>
#endif
-#ifdef PROLOGIO
#include <wx/wxexpr.h>
-#endif
#include "basic.h"
#include "basicp.h"
{
wxRectangleShape::WriteAttributes(clause);
+ clause->AddAttributeValue("current_angle", (long)m_currentAngle);
clause->AddAttributeValue("save_metafile", (long)m_saveToFile);
if (m_saveToFile)
{
wxRectangleShape::ReadAttributes(clause);
int iVal = (int) m_saveToFile;
- clause->AssignAttributeValue("save_metafile", &iVal);
+ clause->GetAttributeValue("save_metafile", iVal);
+ clause->GetAttributeValue("current_angle", m_currentAngle);
m_saveToFile = (iVal != 0);
if (m_saveToFile)
if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex))
{
if (m_image->m_outlinePen)
- dc.SetPen(m_image->m_outlinePen);
+ dc.SetPen(* m_image->m_outlinePen);
}
else
{
{
wxPen *pen = (wxPen *)node->Data();
if (pen)
- dc.SetPen(pen);
+ dc.SetPen(* pen);
}
}
break;
{
wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxSOLID);
if (br)
- dc.SetBrush(br);
+ dc.SetBrush(* br);
}
}
else if (m_image->m_fillColours.Member((wxObject *)m_gdiIndex))
{
if (m_image->m_fillBrush)
{
- dc.SetBrush(m_image->m_fillBrush);
+ dc.SetBrush(* m_image->m_fillBrush);
}
}
else
{
wxBrush *brush = (wxBrush *)node->Data();
if (brush)
- dc.SetBrush(brush);
+ dc.SetBrush(* brush);
}
}
break;
{
wxFont *font = (wxFont *)node->Data();
if (font)
- dc.SetFont(font);
+ dc.SetFont(* font);
}
break;
}
wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
{
case DRAWOP_SET_CLIPPING_RECT:
{
- dc.SetClippingRegion(m_x1 + xoffset, m_y1 + yoffset, m_x2 + xoffset, m_y2 + yoffset);
+ dc.SetClippingRegion((long)(m_x1 + xoffset), (long)(m_y1 + yoffset), (long)(m_x2 + xoffset), (long)(m_y2 + yoffset));
break;
}
case DRAWOP_DESTROY_CLIPPING_RECT:
wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
{
expr->Append(new wxExpr(m_x1));
expr->Append(new wxExpr(m_y1));
- expr->Append(new wxExpr(PrologString, m_textString));
+ expr->Append(new wxExpr(wxExprString, m_textString));
break;
}
case DRAWOP_DRAW_ARC:
wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
expr->Append(new wxExpr((long)m_noPoints));
strcat(oglBuffer, buf3);
}
}
- expr->Append(new wxExpr(PrologString, oglBuffer));
+ expr->Append(new wxExpr(wxExprString, oglBuffer));
return expr;
}
wxString hexString = expr->Nth(2)->StringValue();
while (i < m_noPoints)
{
- buf1[0] = hexString[bufPtr];
- buf1[1] = hexString[bufPtr + 1];
- buf1[2] = hexString[bufPtr + 2];
- buf1[3] = hexString[bufPtr + 3];
+ buf1[0] = hexString[(size_t)bufPtr];
+ buf1[1] = hexString[(size_t)(bufPtr + 1)];
+ buf1[2] = hexString[(size_t)(bufPtr + 2)];
+ buf1[3] = hexString[(size_t)(bufPtr + 3)];
buf1[4] = 0;
- buf2[0] = hexString[bufPtr + 4];
- buf2[1] = hexString[bufPtr + 5];
- buf2[2] = hexString[bufPtr + 6];
- buf2[3] = hexString[bufPtr + 7];
+ buf2[0] = hexString[(size_t)(bufPtr + 4)];
+ buf2[1] = hexString[(size_t)(bufPtr + 5)];
+ buf2[2] = hexString[(size_t)(bufPtr + 6)];
+ buf2[3] = hexString[(size_t)(bufPtr + 7)];
buf2[4] = 0;
bufPtr += 8;
// Draw an outline using the current operation.
bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH)
{
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
// Multiply all points by proportion of new size to old size
double x_proportion = (double)(fabs(w/oldW));
intPoints[i].x = WXROUND (x_proportion * m_points[i].x);
intPoints[i].y = WXROUND (y_proportion * m_points[i].y);
}
- dc.DrawPolygon(n, intPoints, x, y);
+ dc.DrawPolygon(n, intPoints, (long) x, (long) y);
delete[] intPoints;
return TRUE;
}
double x2, double y2,
double *x3, double *y3,
double xOffset, double yOffset,
- bool attachmentMode)
+ int attachmentMode)
{
int n = m_noPoints;
// and we would want to connect to a point on that vertical --
// oglFindEndForPolyline can't cope with this (the arrow
// gets drawn to the wrong place).
- if ((!attachmentMode) && (x1 == x2))
+ if ((attachmentMode == ATTACHMENT_MODE_NONE) && (x1 == x2))
{
// Look for the point we'd be connecting to. This is
// a heuristic...
if (obj->IsKindOf(CLASSINFO(wxPen)))
{
wxPen *thePen = (wxPen *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_PEN));
expr->Append(new wxExpr((long)thePen->GetWidth()));
expr->Append(new wxExpr((long)thePen->GetStyle()));
else if (obj->IsKindOf(CLASSINFO(wxBrush)))
{
wxBrush *theBrush = (wxBrush *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_BRUSH));
expr->Append(new wxExpr((long)theBrush->GetStyle()));
expr->Append(new wxExpr((long)theBrush->GetColour().Red()));
else if (obj->IsKindOf(CLASSINFO(wxFont)))
{
wxFont *theFont = (wxFont *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_FONT));
expr->Append(new wxExpr((long)theFont->GetPointSize()));
expr->Append(new wxExpr((long)theFont->GetFamily()));
else
{
// If no recognised GDI object, append a place holder anyway.
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)0));
}
// Write outline and fill GDI op lists (if any)
if (m_outlineColours.Number() > 0)
{
- wxExpr *outlineExpr = new wxExpr(PrologList);
+ wxExpr *outlineExpr = new wxExpr(wxExprList);
node = m_outlineColours.First();
while (node)
{
}
if (m_fillColours.Number() > 0)
{
- wxExpr *fillExpr = new wxExpr(PrologList);
+ wxExpr *fillExpr = new wxExpr(wxExprList);
node = m_fillColours.First();
while (node)
{