00001 #ifndef __wxsvg_H
00002 #define __wxsvg_H
00003 #include <wx/wfstream.h>
00004 #include <wx/string.h>
00005
00006 #define wxSVGVersion "v0004"
00007
00008 class wxSVGFileDC : public wxDC
00009 {
00010
00011 private:
00012 wxFileOutputStream * outfile ;
00013 bool isOK ;
00014
00015 wxPen m_prevpen , m_oldpen ;
00016 wxBrush m_prevbrush, m_oldbrush ;
00017 wxFont m_prevfont, m_oldfont ;
00018
00019 void Init (wxString f, int Width, int Height, float dpi);
00020
00021 public:
00022
00023 wxSVGFileDC (wxString f);
00024 wxSVGFileDC (wxString f, int Width, int Height);
00025 wxSVGFileDC (wxString f, int Width, int Height, float dpi);
00026 ~wxSVGFileDC();
00027
00028 bool Ok() const {return isOK;};
00029
00030
00031
00032 bool CanDrawBitmap() const
00033 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::CanDrawBitmap Call not yet implemented"); return true ; };
00034
00035 bool CanGetTextExtent() const { return true ; };
00036
00037 int GetDepth() const
00038 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetDepth Call not yet implemented"); return -1 ; };
00039
00040 bool DoFloodFill(wxCoord, wxCoord, const class wxColour &, int = 1)
00041 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoFloodFill Call not yet implemented"); return TRUE ; };
00042
00043 bool DoGetPixel(wxCoord, wxCoord, class wxColour *) const
00044 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoGetPixel Call not yet implemented"); return true ; };
00045
00046 void DoDrawPoint(wxCoord, wxCoord) ;
00047
00048 virtual void DoGetSize(int *width, int *height) const
00049 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoGetSize Call not yet implemented"); };
00050
00051 void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord);
00052
00053 void DoCrossHair(wxCoord, wxCoord)
00054 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::Blit Call not yet implemented"); return ; };
00055
00056 void DoDrawIcon(const class wxIcon &, wxCoord, wxCoord)
00057 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoDrawIcon Call not yet implemented"); return ; };
00058
00059 void DoDrawBitmap(const class wxBitmap &, wxCoord, wxCoord, bool = 0)
00060 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoDrawBitmap Call not yet implemented"); return ; };
00061
00063 virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
00064 wxCoord width, wxCoord height,
00065 wxDC *source, wxCoord xsrc, wxCoord ysrc,
00066 int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1)
00067 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoBlit Call not yet implemented"); return false ; };
00068
00069 void DoSetClippingRegionAsRegion(const class wxRegion &)
00070 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented"); return ; };
00071
00072 void DoDrawSpline(wxList *points) ;
00073
00074
00075
00076 void BeginDrawing() { return;};
00077
00078 bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = FALSE)
00079 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::Blit Call not yet implemented"); return false ; };
00080
00081
00082 void Clear()
00083 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?"); return ; };
00084
00085 void CrossHair(wxCoord x, wxCoord y)
00086 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::Clear() Call not yet implemented"); return ; };
00087
00088 void DestroyClippingRegion()
00089 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::void Call not yet implemented"); return ; };
00090
00091 wxCoord DeviceToLogicalX(wxCoord x)
00092 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DeviceToLogicalX Call not yet implemented"); return x; };
00093
00094 wxCoord DeviceToLogicalXRel(wxCoord x)
00095 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DeviceToLogicalXRel Call not yet implemented"); return x; };
00096
00097 wxCoord DeviceToLogicalY(wxCoord y)
00098 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DeviceToLogicalY Call not yet implemented"); return y; };
00099
00100 wxCoord DeviceToLogicalYRel(wxCoord y)
00101 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DeviceToLogicalYRel Call not yet implemented"); return y ; };
00102
00103 void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool transparent)
00104 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DrawBitmap Call not yet implemented"); return ; };
00105
00106 void DoDrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height) ;
00107
00108 void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) ;
00109
00110 void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) ;
00111
00112 void DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) ;
00113
00114 void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,int fillStyle) ;
00115
00116 void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) ;
00117
00118 void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20) ;
00119
00120 void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) ;
00121
00122 void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
00123
00124 void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h,
00125 wxCoord *descent = NULL, wxCoord *externalLeading = NULL, wxFont *font = NULL) const ;
00126
00127 void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
00128 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::DrawIcon Call not yet implemented"); return ; };
00129
00130 void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0) ;
00131
00132 void EndDoc()
00133 { return ; };
00134
00135 void EndDrawing()
00136 { return ; };
00137
00138 void EndPage()
00139 { return ; };
00140
00141 void FloodFill(wxCoord x, wxCoord y, wxColour *colour, int style=wxFLOOD_SURFACE)
00142 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::FloodFill Call not yet implemented"); return ; };
00143
00144 wxCoord GetCharHeight() const;
00145
00146 wxCoord GetCharWidth() const;
00147
00148 void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height)
00149 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetClippingBox Call not yet implemented"); return ; };
00150
00151 int GetLogicalFunction()
00152 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetLogicalFunction() Call not yet implemented"); return wxCOPY ; };
00153
00154 int GetMapMode()
00155 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetMapMode() Call not yet implemented"); return wxMM_TEXT; };
00156
00157 bool GetOptimization()
00158 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetOptimization() Call not yet implemented"); return TRUE ; };
00159
00160 bool GetPixel(wxCoord x, wxCoord y, wxColour *colour)
00161 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetPen() Call not yet implemented"); return FALSE; };
00162
00163 void GetUserScale(double *x, double *y) const
00164 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::GetUserScale() Call not yet implemented"); return ; };
00165
00166 wxCoord LogicalToDeviceX(wxCoord x)
00167 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::LogicalToDeviceX Call not yet implemented"); return x ; };
00168
00169 wxCoord LogicalToDeviceXRel(wxCoord x)
00170 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::LogicalToDeviceXRel Call not yet implemented"); return x; };
00171
00172 wxCoord LogicalToDeviceY(wxCoord y)
00173 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::LogicalToDeviceY Call not yet implemented"); return y; };
00174
00175 wxCoord LogicalToDeviceYRel(wxCoord y)
00176 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::LogicalToDeviceYRel Call not yet implemented"); return y; };
00177
00178
00179
00180 void SetDeviceOrigin(wxCoord x, wxCoord y)
00181 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetDeviceOrigin() Call not yet implemented"); return ; };
00182
00183
00184 void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
00185 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetClippingRegion Call not yet implemented"); return ; };
00186
00187 void SetPalette(const wxPalette& palette)
00188 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetPalette Call not yet implemented"); return ; };
00189
00190 void SetBackground( const wxBrush &brush ) ;
00191
00192 void SetBackgroundMode( int mode ) ;
00193
00194 void SetBrush(const wxBrush& brush) ;
00195
00196 void SetFont(const wxFont& font) ;
00197
00198 void SetLogicalFunction(int function)
00199 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetLogicalFunction Call not yet implemented"); return ; };
00200
00201 void SetMapMode(int anint)
00202 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetMapMode Call not yet implemented"); return ; };
00203
00204 void SetOptimization(bool optimize) { return ; };
00205
00206 void SetPen(const wxPen& pen) ;
00207
00208 void SetUserScale(double xScale, double yScale)
00209 { wxASSERT_MSG (FALSE, "wxSVGFILEDC::SetUserScale Call not yet implemented"); return ; };
00210
00211 bool StartDoc(const wxString& message)
00212 { return FALSE; };
00213
00214 void StartPage()
00215 { return ; };
00216
00217 };
00218 #endif
wxsvg.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . --