Remove the weird wxSVG_DEBUG which could apparently be used to trace the code
execution by triggering asserts in all functions. This is really not the right
way to implement tracing and seems pretty useless, just remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67375
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/wfstream.h"
#include "wx/filename.h"
#include "wx/wfstream.h"
#include "wx/filename.h"
-#define wxSVG_DEBUG false
-// or true to see the calls being executed
-
// ----------------------------------------------------------
// Global utilities
// ----------------------------------------------------------
// ----------------------------------------------------------
// Global utilities
// ----------------------------------------------------------
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DrawLine Call executed"));
CalcBoundingBox(x1, y1);
CalcBoundingBox(x2, y2);
return;
CalcBoundingBox(x1, y1);
CalcBoundingBox(x2, y2);
return;
void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x1, wxCoord y1)
{
DoDrawRotatedText(text, x1,y1,0.0);
void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x1, wxCoord y1)
{
DoDrawRotatedText(text, x1,y1,0.0);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DrawText Call executed"));
}
void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoord y, double angle)
}
void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoord y, double angle)
// draw background first
// just like DoDrawRectangle except we pass the text color to it and set the border to a 1 pixel wide text background
// draw background first
// just like DoDrawRectangle except we pass the text color to it and set the border to a 1 pixel wide text background
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::Draw Rotated Text Call plotting text background"));
sTmp.Printf ( wxT(" <rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" "), x,y+desc-h, w, h );
s = sTmp + wxT("style=\"") + wxBrushString(m_textBackgroundColour);
s += wxT("stroke-width:1; ") + wxPenString(m_textBackgroundColour);
sTmp.Printf ( wxT(" <rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" "), x,y+desc-h, w, h );
s = sTmp + wxT("style=\"") + wxBrushString(m_textBackgroundColour);
s += wxT("stroke-width:1; ") + wxPenString(m_textBackgroundColour);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DrawRotatedText Call executed"));
}
void wxSVGFileDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
}
void wxSVGFileDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
s += wxT(" /> \n");
write(s);
s += wxT(" /> \n");
write(s);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawRoundedRectangle Call executed"));
CalcBoundingBox(x, y);
CalcBoundingBox(x + width, y + height);
}
CalcBoundingBox(x, y);
CalcBoundingBox(x + width, y + height);
}
}
s += wxT("\" /> \n");
write(s);
}
s += wxT("\" /> \n");
write(s);
-
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawPolygon Call executed"));
}
void wxSVGFileDCImpl::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height)
}
void wxSVGFileDCImpl::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawEllipse Call executed"));
CalcBoundingBox(x, y);
CalcBoundingBox(x + width, y + height);
}
CalcBoundingBox(x, y);
CalcBoundingBox(x + width, y + height);
}
-
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawArc Call executed"));
}
void wxSVGFileDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
}
void wxSVGFileDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
-
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawEllipticArc Call executed"));
}
void wxSVGFileDCImpl::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , const wxFont *font) const
}
void wxSVGFileDCImpl::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , const wxFont *font) const
sDC.SetFont (m_font);
if ( font != NULL ) sDC.SetFont ( *font );
sDC.GetTextExtent(string, w, h, descent, externalLeading );
sDC.SetFont (m_font);
if ( font != NULL ) sDC.SetFont ( *font );
sDC.GetTextExtent(string, w, h, descent, externalLeading );
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::GetTextExtent Call executed"));
}
wxCoord wxSVGFileDCImpl::GetCharHeight() const
}
wxCoord wxSVGFileDCImpl::GetCharHeight() const
wxScreenDC sDC;
sDC.SetFont (m_font);
wxScreenDC sDC;
sDC.SetFont (m_font);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::GetCharHeight Call executing"));
return ( sDC.GetCharHeight() );
}
return ( sDC.GetCharHeight() );
}
wxScreenDC sDC;
sDC.SetFont (m_font);
wxScreenDC sDC;
sDC.SetFont (m_font);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::GetCharWidth Call executing"));
return ( sDC.GetCharWidth() );
}
return ( sDC.GetCharWidth() );
}
m_brush = brush;
m_graphics_changed = true;
m_brush = brush;
m_graphics_changed = true;
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::SetBrush Call executed"));
m_pen = pen;
m_graphics_changed = true;
m_pen = pen;
m_graphics_changed = true;
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::SetPen Call executed"));
}
void wxSVGFileDCImpl::NewGraphics ()
}
void wxSVGFileDCImpl::NewGraphics ()
s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n") + sWarn;
write(s);
m_graphics_changed = false;
s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n") + sWarn;
write(s);
m_graphics_changed = false;
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::NewGraphics Call executed"));
-
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::SetFont Call executed"));
}
// export a bitmap as a raster image in png
}
// export a bitmap as a raster image in png
memDC.Blit(0, 0, width, height, source, xsrc, ysrc);
memDC.SelectObject( wxNullBitmap );
DoDrawBitmap(myBitmap, xdest, ydest);
memDC.Blit(0, 0, width, height, source, xsrc, ysrc);
memDC.SelectObject( wxNullBitmap );
DoDrawBitmap(myBitmap, xdest, ydest);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoBlit Call executed"));
memDC.DrawIcon(myIcon,0,0);
memDC.SelectObject( wxNullBitmap );
DoDrawBitmap(myBitmap, x, y);
memDC.DrawIcon(myIcon,0,0);
memDC.SelectObject( wxNullBitmap );
DoDrawBitmap(myBitmap, x, y);
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawIcon Call executed"));
write(s);
}
m_OK = m_outfile->Ok () && bPNG_OK;
write(s);
}
m_OK = m_outfile->Ok () && bPNG_OK;
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawBitmap Call executed"));