1 /////////////////////////////////////////////////////////////////////////////
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
16 #include "wx/window.h"
19 #include "wx/dialog.h"
21 #include "wx/bitmap.h"
22 #include "wx/dcmemory.h"
27 #include "wx/dcprint.h"
32 #include "wx/os2/private.h"
34 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
36 // ---------------------------------------------------------------------------
38 // ---------------------------------------------------------------------------
40 static const int VIEWPORT_EXTENT
= 1000;
42 static const int MM_POINTS
= 9;
43 static const int MM_METRIC
= 10;
45 // usually this is defined in math.h
47 static const double M_PI
= 3.14159265358979323846;
50 // ---------------------------------------------------------------------------
52 // ---------------------------------------------------------------------------
54 // convert degrees to radians
55 static inline double DegToRad(double deg
) { return (deg
* M_PI
) / 180.0; }
59 , int nForegroundColour
64 vCbnd
.lColor
= nForegroundColour
;
65 ::GpiSetAttrs( hPS
// presentation-space handle
66 ,PRIM_CHAR
// Char primitive.
67 ,CBB_COLOR
// sets color.
69 ,&vCbnd
// buffer for attributes.
80 ::GpiQueryAttrs( hPS
// presentation-space handle
81 ,PRIM_CHAR
// Char primitive.
82 ,CBB_BACK_COLOR
// Background color.
83 ,&vCbnd
// buffer for attributes.
85 return vCbnd
.lBackColor
;
91 , int nBackgroundColour
97 rc
= QueryTextBkColor(hPS
);
99 vCbnd
.lBackColor
= nBackgroundColour
;
100 ::GpiSetAttrs(hPS
, // presentation-space handle
101 PRIM_CHAR
, // Char primitive.
102 CBB_BACK_COLOR
, // sets color.
104 &vCbnd
// buffer for attributes.
111 , int nBackgroundMode
114 if(nBackgroundMode
== wxTRANSPARENT
)
119 // the background of the primitive takes over whatever is underneath.
126 // ===========================================================================
128 // ===========================================================================
130 // ---------------------------------------------------------------------------
132 // ---------------------------------------------------------------------------
149 m_bIsPaintTime
= FALSE
;// True at Paint Time
157 // This will select current objects out of the DC,
158 // which is what you have to do before deleting the
160 void wxDC::SelectOldObjects(WXHDC dc
)
166 // ::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
167 if (m_vSelectedBitmap
.Ok())
169 m_vSelectedBitmap
.SetSelectedInto(NULL
);
175 // ::SelectObject((HDC) dc, (HPEN) m_oldPen);
180 // ::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
185 // ::SelectObject((HDC) dc, (HFONT) m_oldFont);
190 // ::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
195 m_brush
= wxNullBrush
;
197 m_palette
= wxNullPalette
;
199 m_backgroundBrush
= wxNullBrush
;
200 m_vSelectedBitmap
= wxNullBitmap
;
203 // ---------------------------------------------------------------------------
205 // ---------------------------------------------------------------------------
207 #define DO_SET_CLIPPING_BOX() \
211 GetClipBox(GetHdc(), &rect); \
213 m_clipX1 = (wxCoord) XDEV2LOG(rect.left); \
214 m_clipY1 = (wxCoord) YDEV2LOG(rect.top); \
215 m_clipX2 = (wxCoord) XDEV2LOG(rect.right); \
216 m_clipY2 = (wxCoord) YDEV2LOG(rect.bottom); \
219 void wxDC::DoSetClippingRegion( wxCoord x
, wxCoord y
220 ,wxCoord width
, wxCoord height
226 void wxDC::DoSetClippingRegionAsRegion(const wxRegion
& region
)
231 void wxDC::DestroyClippingRegion(void)
236 // ---------------------------------------------------------------------------
237 // query capabilities
238 // ---------------------------------------------------------------------------
240 bool wxDC::CanDrawBitmap() const
245 bool wxDC::CanGetTextExtent() const
247 // What sort of display is it?
248 int technology
= 0; // TODO: ::GetDeviceCaps(GetHdc(), TECHNOLOGY);
250 // TODO: return (technology == DT_RASDISPLAY) || (technology == DT_RASPRINTER);
254 int wxDC::GetDepth() const
260 // ---------------------------------------------------------------------------
262 // ---------------------------------------------------------------------------
269 void wxDC::DoFloodFill( wxCoord x
278 bool wxDC::DoGetPixel(wxCoord x
, wxCoord y
, wxColour
*col
) const
284 void wxDC::DoCrossHair(wxCoord x
, wxCoord y
)
289 void wxDC::DoDrawLine(
302 // ::GpiSetColor(m_hPS,CLR_RED); //DEbug
303 ::GpiMove(m_hPS
, &vPoint
[0]);
304 ::GpiLine(m_hPS
, &vPoint
[1]);
307 void wxDC::DoDrawArc( wxCoord x1
, wxCoord y1
308 ,wxCoord x2
, wxCoord y2
309 ,wxCoord xc
, wxCoord yc
315 void wxDC::DoDrawCheckMark(wxCoord x1
, wxCoord y1
,
316 wxCoord width
, wxCoord height
)
321 void wxDC::DoDrawPoint(wxCoord x
, wxCoord y
)
326 void wxDC::DoDrawPolygon(int n
, wxPoint points
[]
327 ,wxCoord xoffset
, wxCoord yoffset
334 void wxDC::DoDrawLines( int n
, wxPoint points
[]
335 ,wxCoord xoffset
, wxCoord yoffset
341 void wxDC::DoDrawRectangle(
352 vPoint
[1].x
= vX
+ vWidth
;
353 vPoint
[1].y
= vY
- vHeight
; //mustdie !!! ??
355 ::GpiMove(m_hPS
, &vPoint
[0]);
356 ::GpiBox( m_hPS
// handle to a presentation space
357 ,DRO_OUTLINE
// draw the box outline ? or ?
358 ,&vPoint
[1] // address of the corner
359 ,0L // horizontal corner radius
360 ,0L // vertical corner radius
364 void wxDC::DoDrawRoundedRectangle(
376 vPoint
[1].x
= vX
+ vWidth
;
377 vPoint
[1].y
= vY
+ vHeight
; //or -height aka mustdie !!! ??
379 ::GpiMove(m_hPS
, &vPoint
[0]);
380 ::GpiBox( m_hPS
// handle to a presentation space
381 ,DRO_OUTLINE
// draw the box outline ? or ?
382 ,&vPoint
[1] // address of the corner
383 ,(LONG
)dRadius
// horizontal corner radius
384 ,(LONG
)dRadius
// vertical corner radius
388 void wxDC::DoDrawEllipse(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
393 void wxDC::DoDrawEllipticArc( wxCoord x
404 void wxDC::DoDrawIcon(const wxIcon
& icon
, wxCoord x
, wxCoord y
)
409 void wxDC::DoDrawBitmap( const wxBitmap
&bmp
410 ,wxCoord x
, wxCoord y
417 void wxDC::DoDrawText(
418 const wxString
& rsText
429 void wxDC::DrawAnyText(
430 const wxString
& rsText
435 int nOldBackground
= 0;
440 // prepare for drawing the text
444 // Set text color attributes
446 if (m_textForegroundColour
.Ok())
449 ,(int)m_textForegroundColour
.GetPixel()
453 if (m_textBackgroundColour
.Ok())
455 nOldBackground
= SetTextBkColor( m_hPS
456 ,(int)m_textBackgroundColour
.GetPixel()
465 lHits
= ::GpiCharStringAt( m_hPS
472 wxLogLastError(wxT("TextOut"));
476 // Restore the old parameters (text foreground colour may be left because
477 // it never is set to anything else, but background should remain
478 // transparent even if we just drew an opaque string)
480 if (m_textBackgroundColour
.Ok())
481 SetTextBkColor( m_hPS
489 void wxDC::DoDrawRotatedText(
490 const wxString
& rsText
508 DoDrawText(text, x, y);
513 wxFillLogFont(&lf, &m_font);
515 // GDI wants the angle in tenth of degree
516 long angle10 = (long)(angle * 10);
517 lf.lfEscapement = angle10;
518 lf. lfOrientation = angle10;
520 HFONT hfont = ::CreateFontIndirect(&lf);
523 wxLogLastError("CreateFont");
527 HFONT hfontOld = ::SelectObject(GetHdc(), hfont);
529 DrawAnyText(text, x, y);
531 (void)::SelectObject(GetHdc(), hfontOld);
534 // call the bounding box by adding all four vertices of the rectangle
535 // containing the text to it (simpler and probably not slower than
536 // determining which of them is really topmost/leftmost/...)
538 GetTextExtent(text, &w, &h);
540 double rad = DegToRad(angle);
542 // "upper left" and "upper right"
543 CalcBoundingBox(x, y);
544 CalcBoundingBox(x + w*cos(rad), y - h*sin(rad));
545 CalcBoundingBox(x + h*sin(rad), y + h*cos(rad));
547 // "bottom left" and "bottom right"
548 x += (wxCoord)(h*sin(rad));
549 y += (wxCoord)(h*cos(rad));
550 CalcBoundingBox(x, y);
551 CalcBoundingBox(x + h*sin(rad), y + h*cos(rad));
556 // ---------------------------------------------------------------------------
558 // ---------------------------------------------------------------------------
560 void wxDC::SetPalette(const wxPalette
& palette
)
570 // Set the old object temporarily, in case the assignment deletes an object
571 // that's not yet selected out.
575 // ::SelectObject(GetHdc(), (HFONT) m_hOldFont);
584 // ::SelectObject(GetHdc(), (HFONT) m_hOldFont);
588 if (m_font
.Ok() && m_font
.GetResourceHandle())
590 HFONT hFont
= (HFONT
)0; //::SelectObject(GetHdc(), (HFONT) m_font.GetResourceHandle());
591 if (hFont
== (HFONT
) NULL
)
593 wxLogDebug(wxT("::SelectObject failed in wxDC::SetFont."));
596 m_hOldFont
= (WXHFONT
) hFont
;
604 wxCHECK_RET( Ok(), wxT("invalid window dc") );
612 int nWidth
= m_pen
.GetWidth();
621 ( fabs((double) XLOG2DEVREL(nWidth
)) +
622 fabs((double) YLOG2DEVREL(nWidth
))
626 wxColour vColor
= m_pen
.GetColour();
633 void wxDC::SetBrush(const wxBrush
& brush
)
638 void wxDC::SetBackground(const wxBrush
& brush
)
643 void wxDC::SetBackgroundMode(
647 m_backgroundMode
= nMode
;
650 void wxDC::SetLogicalFunction(int function
)
655 void wxDC::SetRop(WXHDC dc
)
657 if (!dc
|| m_logicalFunction
< 0)
661 // These may be wrong
662 switch (m_logicalFunction
)
664 // TODO: Figure this stuff out
665 // case wxXOR: c_rop = R2_XORPEN; break;
666 // case wxXOR: c_rop = R2_NOTXORPEN; break;
667 // case wxINVERT: c_rop = R2_NOT; break;
668 // case wxOR_REVERSE: c_rop = R2_MERGEPENNOT; break;
669 // case wxAND_REVERSE: c_rop = R2_MASKPENNOT; break;
670 // case wxCLEAR: c_rop = R2_WHITE; break;
671 // case wxSET: c_rop = R2_BLACK; break;
672 // case wxSRC_INVERT: c_rop = R2_NOTCOPYPEN; break;
673 // case wxOR_INVERT: c_rop = R2_MERGENOTPEN; break;
674 // case wxAND: c_rop = R2_MASKPEN; break;
675 // case wxOR: c_rop = R2_MERGEPEN; break;
676 // case wxAND_INVERT: c_rop = R2_MASKNOTPEN; break;
681 // c_rop = R2_COPYPEN;
684 // SetROP2((HDC) dc, c_rop);
687 bool wxDC::StartDoc(const wxString
& message
)
689 // We might be previewing, so return TRUE to let it continue.
697 void wxDC::StartPage()
705 // ---------------------------------------------------------------------------
707 // ---------------------------------------------------------------------------
709 wxCoord
wxDC::GetCharHeight() const
715 wxCoord
wxDC::GetCharWidth() const
721 void wxDC::DoGetTextExtent(
722 const wxString
& rsString
726 , wxCoord
* pvExternalLeading
730 POINTL avPoint
[TXTBOX_COUNT
];
735 FONTMETRICS vFM
; // metrics structure
738 ERRORID vErrorCode
; // last error id code
739 wxFont
* pFontToUse
= (wxFont
*)pTheFont
;
742 pFontToUse
= (wxFont
*)&m_font
;
743 l
= rsString
.length();
744 pStr
= (PCH
) rsString
.c_str();
747 // In world coordinates.
749 bRc
= ::GpiQueryTextBox( m_hPS
752 ,TXTBOX_COUNT
// return maximum information
753 ,avPoint
// array of coordinates points
757 vErrorCode
= ::WinGetLastError(wxGetInstance());
760 vPtMin
.x
= avPoint
[0].x
;
761 vPtMax
.x
= avPoint
[0].x
;
762 vPtMin
.y
= avPoint
[0].y
;
763 vPtMax
.y
= avPoint
[0].y
;
764 for (i
= 1; i
< 4; i
++)
766 if(vPtMin
.x
> avPoint
[i
].x
) vPtMin
.x
= avPoint
[i
].x
;
767 if(vPtMin
.y
> avPoint
[i
].y
) vPtMin
.y
= avPoint
[i
].y
;
768 if(vPtMax
.x
< avPoint
[i
].x
) vPtMax
.x
= avPoint
[i
].x
;
769 if(vPtMax
.y
< avPoint
[i
].y
) vPtMax
.y
= avPoint
[i
].y
;
771 ::GpiQueryFontMetrics( m_hPS
777 *pvX
= (wxCoord
)(vPtMax
.x
- vPtMin
.x
+ 1);
779 *pvY
= (wxCoord
)(vPtMax
.y
- vPtMin
.y
+ 1);
781 *pvDescent
= vFM
.lMaxDescender
;
782 if (pvExternalLeading
)
783 *pvExternalLeading
= vFM
.lExternalLeading
;
786 void wxDC::SetMapMode( int mode
)
791 void wxDC::SetUserScale(double x
, double y
)
796 SetMapMode(m_mappingMode
);
799 void wxDC::SetAxisOrientation(bool xLeftRight
, bool yBottomUp
)
801 m_signX
= xLeftRight
? 1 : -1;
802 m_signY
= yBottomUp
? -1 : 1;
804 SetMapMode(m_mappingMode
);
807 void wxDC::SetSystemScale(double x
, double y
)
812 SetMapMode(m_mappingMode
);
815 void wxDC::SetLogicalOrigin( wxCoord x
, wxCoord y
)
820 void wxDC::SetDeviceOrigin( wxCoord x
, wxCoord y
)
825 // ---------------------------------------------------------------------------
826 // coordinates transformations
827 // ---------------------------------------------------------------------------
829 wxCoord
wxDCBase::DeviceToLogicalX(wxCoord x
) const
831 return (wxCoord
) (((x
) - m_deviceOriginX
)/(m_logicalScaleX
*m_userScaleX
*m_signX
*m_scaleX
) - m_logicalOriginX
);
834 wxCoord
wxDCBase::DeviceToLogicalXRel(wxCoord x
) const
836 return (wxCoord
) ((x
)/(m_logicalScaleX
*m_userScaleX
*m_signX
*m_scaleX
));
839 wxCoord
wxDCBase::DeviceToLogicalY(wxCoord y
) const
841 return (wxCoord
) (((y
) - m_deviceOriginY
)/(m_logicalScaleY
*m_userScaleY
*m_signY
*m_scaleY
) - m_logicalOriginY
);
844 wxCoord
wxDCBase::DeviceToLogicalYRel(wxCoord y
) const
846 return (wxCoord
) ((y
)/(m_logicalScaleY
*m_userScaleY
*m_signY
*m_scaleY
));
849 wxCoord
wxDCBase::LogicalToDeviceX(wxCoord x
) const
851 return (wxCoord
) ((x
- m_logicalOriginX
)*m_logicalScaleX
*m_userScaleX
*m_signX
*m_scaleX
+ m_deviceOriginX
);
854 wxCoord
wxDCBase::LogicalToDeviceXRel(wxCoord x
) const
856 return (wxCoord
) (x
*m_logicalScaleX
*m_userScaleX
*m_signX
*m_scaleX
);
859 wxCoord
wxDCBase::LogicalToDeviceY(wxCoord y
) const
861 return (wxCoord
) ((y
- m_logicalOriginY
)*m_logicalScaleY
*m_userScaleY
*m_signY
*m_scaleY
+ m_deviceOriginY
);
864 wxCoord
wxDCBase::LogicalToDeviceYRel(wxCoord y
) const
866 return (wxCoord
) (y
*m_logicalScaleY
*m_userScaleY
*m_signY
*m_scaleY
);
869 // ---------------------------------------------------------------------------
871 // ---------------------------------------------------------------------------
873 bool wxDC::DoBlit( wxCoord xdest
888 void wxDC::DoGetSize( int* width
, int* height
) const
893 void wxDC::DoGetSizeMM( int* width
, int* height
) const
898 wxSize
wxDC::GetPPI() const
903 return (wxSize(x
,y
));
906 void wxDC::SetLogicalScale( double x
, double y
)
911 #if WXWIN_COMPATIBILITY
912 void wxDC::DoGetTextExtent(const wxString
& string
, float *x
, float *y
,
913 float *descent
, float *externalLeading
,
914 wxFont
*theFont
, bool use16bit
) const
916 wxCoord x1
, y1
, descent1
, externalLeading1
;
917 GetTextExtent(string
, & x1
, & y1
, & descent1
, & externalLeading1
, theFont
, use16bit
);
922 *externalLeading
= externalLeading1
;
926 // ---------------------------------------------------------------------------
927 // spline drawing code
928 // ---------------------------------------------------------------------------
932 class wxSpline
: public wxObject
938 wxSpline(wxList
*list
);
941 // Doesn't delete points
945 void wx_draw_open_spline(wxDC
*dc
, wxSpline
*spline
);
947 void wx_quadratic_spline(double a1
, double b1
, double a2
, double b2
,
948 double a3
, double b3
, double a4
, double b4
);
949 void wx_clear_stack();
950 int wx_spline_pop(double *x1
, double *y1
, double *x2
, double *y2
, double *x3
,
951 double *y3
, double *x4
, double *y4
);
952 void wx_spline_push(double x1
, double y1
, double x2
, double y2
, double x3
, double y3
,
953 double x4
, double y4
);
954 static bool wx_spline_add_point(double x
, double y
);
955 static void wx_spline_draw_point_array(wxDC
*dc
);
956 wxSpline
*wx_make_spline(int x1
, int y1
, int x2
, int y2
, int x3
, int y3
);
958 void wxDC::DoDrawSpline(wxList
*list
)
960 wxSpline
spline(list
);
962 wx_draw_open_spline(this, &spline
);
965 wxList wx_spline_point_list
;
967 void wx_draw_open_spline(wxDC
*dc
, wxSpline
*spline
)
970 double cx1
, cy1
, cx2
, cy2
, cx3
, cy3
, cx4
, cy4
;
971 double x1
, y1
, x2
, y2
;
973 wxNode
*node
= spline
->points
->First();
974 p
= (wxPoint
*)node
->Data();
980 p
= (wxPoint
*)node
->Data();
984 cx1
= (double)((x1
+ x2
) / 2);
985 cy1
= (double)((y1
+ y2
) / 2);
986 cx2
= (double)((cx1
+ x2
) / 2);
987 cy2
= (double)((cy1
+ y2
) / 2);
989 wx_spline_add_point(x1
, y1
);
991 while ((node
= node
->Next()) != NULL
)
993 p
= (wxPoint
*)node
->Data();
998 cx4
= (double)(x1
+ x2
) / 2;
999 cy4
= (double)(y1
+ y2
) / 2;
1000 cx3
= (double)(x1
+ cx4
) / 2;
1001 cy3
= (double)(y1
+ cy4
) / 2;
1003 wx_quadratic_spline(cx1
, cy1
, cx2
, cy2
, cx3
, cy3
, cx4
, cy4
);
1007 cx2
= (double)(cx1
+ x2
) / 2;
1008 cy2
= (double)(cy1
+ y2
) / 2;
1011 wx_spline_add_point((double)wx_round(cx1
), (double)wx_round(cy1
));
1012 wx_spline_add_point(x2
, y2
);
1014 wx_spline_draw_point_array(dc
);
1018 /********************* CURVES FOR SPLINES *****************************
1020 The following spline drawing routine is from
1022 "An Algorithm for High-Speed Curve Generation"
1023 by George Merrill Chaikin,
1024 Computer Graphics and Image Processing, 3, Academic Press,
1029 "On Chaikin's Algorithm" by R. F. Riesenfeld,
1030 Computer Graphics and Image Processing, 4, Academic Press,
1033 ***********************************************************************/
1035 #define half(z1, z2) ((z1+z2)/2.0)
1038 /* iterative version */
1040 void wx_quadratic_spline(double a1
, double b1
, double a2
, double b2
, double a3
, double b3
, double a4
,
1043 register double xmid
, ymid
;
1044 double x1
, y1
, x2
, y2
, x3
, y3
, x4
, y4
;
1047 wx_spline_push(a1
, b1
, a2
, b2
, a3
, b3
, a4
, b4
);
1049 while (wx_spline_pop(&x1
, &y1
, &x2
, &y2
, &x3
, &y3
, &x4
, &y4
)) {
1050 xmid
= (double)half(x2
, x3
);
1051 ymid
= (double)half(y2
, y3
);
1052 if (fabs(x1
- xmid
) < THRESHOLD
&& fabs(y1
- ymid
) < THRESHOLD
&&
1053 fabs(xmid
- x4
) < THRESHOLD
&& fabs(ymid
- y4
) < THRESHOLD
) {
1054 wx_spline_add_point((double)wx_round(x1
), (double)wx_round(y1
));
1055 wx_spline_add_point((double)wx_round(xmid
), (double)wx_round(ymid
));
1057 wx_spline_push(xmid
, ymid
, (double)half(xmid
, x3
), (double)half(ymid
, y3
),
1058 (double)half(x3
, x4
), (double)half(y3
, y4
), x4
, y4
);
1059 wx_spline_push(x1
, y1
, (double)half(x1
, x2
), (double)half(y1
, y2
),
1060 (double)half(x2
, xmid
), (double)half(y2
, ymid
), xmid
, ymid
);
1066 /* utilities used by spline drawing routines */
1069 typedef struct wx_spline_stack_struct
{
1070 double x1
, y1
, x2
, y2
, x3
, y3
, x4
, y4
;
1074 #define SPLINE_STACK_DEPTH 20
1075 static Stack wx_spline_stack
[SPLINE_STACK_DEPTH
];
1076 static Stack
*wx_stack_top
;
1077 static int wx_stack_count
;
1079 void wx_clear_stack()
1081 wx_stack_top
= wx_spline_stack
;
1085 void wx_spline_push(double x1
, double y1
, double x2
, double y2
, double x3
, double y3
, double x4
, double y4
)
1087 wx_stack_top
->x1
= x1
;
1088 wx_stack_top
->y1
= y1
;
1089 wx_stack_top
->x2
= x2
;
1090 wx_stack_top
->y2
= y2
;
1091 wx_stack_top
->x3
= x3
;
1092 wx_stack_top
->y3
= y3
;
1093 wx_stack_top
->x4
= x4
;
1094 wx_stack_top
->y4
= y4
;
1099 int wx_spline_pop(double *x1
, double *y1
, double *x2
, double *y2
,
1100 double *x3
, double *y3
, double *x4
, double *y4
)
1102 if (wx_stack_count
== 0)
1106 *x1
= wx_stack_top
->x1
;
1107 *y1
= wx_stack_top
->y1
;
1108 *x2
= wx_stack_top
->x2
;
1109 *y2
= wx_stack_top
->y2
;
1110 *x3
= wx_stack_top
->x3
;
1111 *y3
= wx_stack_top
->y3
;
1112 *x4
= wx_stack_top
->x4
;
1113 *y4
= wx_stack_top
->y4
;
1117 static bool wx_spline_add_point(double x
, double y
)
1119 wxPoint
*point
= new wxPoint
;
1122 wx_spline_point_list
.Append((wxObject
*)point
);
1126 static void wx_spline_draw_point_array(wxDC
*dc
)
1128 dc
->DrawLines(&wx_spline_point_list
, 0, 0);
1129 wxNode
*node
= wx_spline_point_list
.First();
1132 wxPoint
*point
= (wxPoint
*)node
->Data();
1135 node
= wx_spline_point_list
.First();
1139 wxSpline::wxSpline(wxList
*list
)
1144 wxSpline::~wxSpline()
1148 void wxSpline::DeletePoints()
1150 for(wxNode
*node
= points
->First(); node
; node
= points
->First())
1152 wxPoint
*point
= (wxPoint
*)node
->Data();
1160 #endif // wxUSE_SPLINES