-void wxSVGFileDC::NewGraphics ()
-{
-
- int w = m_pen.GetWidth ();
- wxColour c = m_pen.GetColour () ;
-
- wxString s, sBrush, sPenCap, sPenJoin, sPenStyle, sLast, sWarn;
-
- sBrush = wxT("</g>\n<g style=\"") + wxBrushString ( m_brush.GetColour (), m_brush.GetStyle () )
- + wxT(" stroke:#") + wxColStr (c) + wxT("; ") ;
-
- switch ( m_pen.GetCap () )
- {
- case wxCAP_PROJECTING :
- sPenCap = wxT("stroke-linecap:square; ") ;
- break ;
- case wxCAP_BUTT :
- sPenCap = wxT("stroke-linecap:butt; ") ;
- break ;
- case wxCAP_ROUND :
- default :
- sPenCap = wxT("stroke-linecap:round; ") ;
- };
- switch ( m_pen.GetJoin () )
- {
- case wxJOIN_BEVEL :
- sPenJoin = wxT("stroke-linejoin:bevel; ") ;
- break ;
- case wxJOIN_MITER :
- sPenJoin = wxT("stroke-linejoin:miter; ") ;
- break ;
- case wxJOIN_ROUND :
- default :
- sPenJoin = wxT("stroke-linejoin:round; ") ;
- };
-
- switch ( m_pen.GetStyle () )
- {
- case wxSOLID :
- sPenStyle = wxT("stroke-opacity:1.0; stroke-opacity:1.0; ") ;
- break ;
- case wxTRANSPARENT :
- sPenStyle = wxT("stroke-opacity:0.0; stroke-opacity:0.0; ") ;
- break ;
- default :
- wxASSERT_MSG(FALSE, wxT("wxSVGFileDC::SetPen Call called to set a Style which is not available")) ;
- sWarn = sWarn + wxT("<!--- wxSVGFileDC::SetPen Call called to set a Style which is not available --> \n") ;
- }
-
- sLast.Printf ( wxT("stroke-width:%d\" \n transform=\"translate(%.2g %.2g) scale(%.2g %.2g)\">"),
- w, m_OriginX, m_OriginY, m_scaleX, m_scaleY );
-
- s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
- m_outfile->Write (s.c_str(), s.Len() ) ;
- m_OK = m_outfile->Ok ();
- m_graphics_changed = FALSE ;
- wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::NewGraphics Call executed")) ;