if (! wxPy2int_seq_helper(coords, &x, &y)) {
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
- return False;
+ return false;
}
dc.DrawPoint(x, y);
- return True;
+ return true;
}
bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords)
if (! wxPy4int_seq_helper(coords, &x1, &y1, &x2, &y2)) {
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x1,y2) sequences.");
- return False;
+ return false;
}
dc.DrawLine(x1,y1, x2,y2);
- return True;
+ return true;
}
bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords)
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
- return False;
+ return false;
}
dc.DrawRectangle(x, y, w, h);
- return True;
+ return true;
}
bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords)
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
- return False;
+ return false;
}
dc.DrawEllipse(x, y, w, h);
- return True;
+ return true;
}
points = wxPoint_LIST_helper(coords, &numPoints);
if (! points) {
PyErr_SetString(PyExc_TypeError, "Expected a sequence of sequences of (x,y) sequences.");
- return False;
+ return false;
}
dc.DrawPolygon(numPoints, points);
- return True;
+ delete [] points;
+ return true;
}