-void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle )
-{
- int n = list->Number();
- wxPoint *points = new wxPoint[n];
-
- int i = 0;
- for( wxNode *node = list->First(); node; node = node->Next() )
- {
- wxPoint *point = (wxPoint *)node->Data();
- points[i].x = point->x;
- points[i++].y = point->y;
- };
- DrawPolygon( n, points, xoffset, yoffset, fillStyle );
- delete[] points;
-};
-
-void wxDC::DrawLines( wxList *list, long xoffset, long yoffset )
-{
- int n = list->Number();
- wxPoint *points = new wxPoint[n];
-
- int i = 0;
- for( wxNode *node = list->First(); node; node = node->Next() )
- {
- wxPoint *point = (wxPoint *)node->Data();
- points[i].x = point->x;
- points[i++].y = point->y;
- };
- DrawLines( n, points, xoffset, yoffset );
- delete []points;
-};
-
-void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 )
-{
- wxList list;
- list.DeleteContents(TRUE);
- list.Append( new wxPoint(x1, y1) );
- list.Append( new wxPoint(x2, y2) );
- list.Append( new wxPoint(x3, y3) );
- DrawSpline(&list);
-};
-
-void wxDC::DrawSpline( wxList *points )
-{
- DrawOpenSpline( points );
-};
-
-void wxDC::DrawSpline( int n, wxPoint points[] )
-{
- wxList list;
- for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] );
- DrawSpline( &list );
-};
-
-void wxDC::SetClippingRegion( long x, long y, long width, long height )
-{
- m_clipping = TRUE;
- m_clipX1 = x;
- m_clipY1 = y;
- m_clipX2 = x + width;
- m_clipY2 = y + height;
-};
-
-void wxDC::DestroyClippingRegion(void)
-{
- m_clipping = FALSE;
-};
-
-void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const
-{
- if (m_clipping)
- {
- if (x) *x = m_clipX1;
- if (y) *y = m_clipY1;
- if (width) *width = (m_clipX2 - m_clipX1);
- if (height) *height = (m_clipY2 - m_clipY1);
- }
- else
- *x = *y = *width = *height = 0;
-};
-
-void wxDC::GetSize( int* width, int* height ) const
-{
- *width = m_maxX-m_minX;
- *height = m_maxY-m_minY;
-};