sTmp = m_font.GetFaceName () ;
if (sTmp.Len () > 0) s = s + wxT("style=\"font-family:") + sTmp + wxT("; ");
else s = s + wxT("style=\" ") ;
wxString fontweights [3] = { wxT("normal"), wxT("lighter"), wxT("bold") };
s = s + wxT("font-weight:") + fontweights[m_font.GetWeight() - wxNORMAL] + semicolon + space;
sTmp = m_font.GetFaceName () ;
if (sTmp.Len () > 0) s = s + wxT("style=\"font-family:") + sTmp + wxT("; ");
else s = s + wxT("style=\" ") ;
wxString fontweights [3] = { wxT("normal"), wxT("lighter"), wxT("bold") };
s = s + wxT("font-weight:") + fontweights[m_font.GetWeight() - wxNORMAL] + semicolon + space;
wxString fontstyles [5] = { wxT("normal"), wxT("style error"), wxT("style error"), wxT("italic"), wxT("oblique") };
s = s + wxT("font-style:") + fontstyles[m_font.GetStyle() - wxNORMAL] + semicolon + space;
wxString fontstyles [5] = { wxT("normal"), wxT("style error"), wxT("style error"), wxT("italic"), wxT("oblique") };
s = s + wxT("font-style:") + fontstyles[m_font.GetStyle() - wxNORMAL] + semicolon + space;
sTmp.Printf (wxT("font-size:%dpt; fill:#"), m_font.GetPointSize () );
s = s + sTmp ;
s = s + wxColStr (m_textForegroundColour) + wxT("; stroke:#") + wxColStr (m_textForegroundColour) + wxT("; ") ;
sTmp.Printf (wxT("font-size:%dpt; fill:#"), m_font.GetPointSize () );
s = s + sTmp ;
s = s + wxColStr (m_textForegroundColour) + wxT("; stroke:#") + wxColStr (m_textForegroundColour) + wxT("; ") ;
x, y, width, height, radius );
s = s + wxT(" /> ") + newline ;
x, y, width, height, radius );
s = s + wxT(" /> ") + newline ;
s.Printf ( wxT("<path d=\"M%d %d A%d %d 0.0 %d %d %d %d L %d %d z "),
int(xs), int(ys), int(rx), int(ry),
s.Printf ( wxT("<path d=\"M%d %d A%d %d 0.0 %d %d %d %d L %d %d z "),
int(xs), int(ys), int(rx), int(ry),
// width, color, ends, joins : currently implemented
// dashes, stipple : not implemented
m_pen = pen ;
// width, color, ends, joins : currently implemented
// dashes, stipple : not implemented
m_pen = pen ;
m_graphics_changed = TRUE ;
wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::SetPen Call executed")) ;
}
m_graphics_changed = TRUE ;
wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::SetPen Call executed")) ;
}
wxColour c = m_pen.GetColour () ;
wxString s, sBrush, sPenCap, sPenJoin, sPenStyle, sLast, sWarn;
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("; ") ;
-
+
+ sBrush = wxT("</g>\n<g style=\"") + wxBrushString ( m_brush.GetColour (), m_brush.GetStyle () )
+ + wxT(" stroke:#") + wxColStr (c) + wxT("; ") ;
+
w, m_OriginX, m_OriginY, m_scaleX, m_scaleY );
s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
w, m_OriginX, m_OriginY, m_scaleX, m_scaleY );
s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
// export a bitmap as a raster image in png
bool wxSVGFileDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
// export a bitmap as a raster image in png
bool wxSVGFileDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC* source, wxCoord xsrc, wxCoord ysrc,
- int logicalFunc /*= wxCOPY*/, bool useMask /*= FALSE*/,
- wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/)
+ wxDC* source, wxCoord xsrc, wxCoord ysrc,
+ int logicalFunc /*= wxCOPY*/, bool useMask /*= FALSE*/,
+ wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/)
if (logicalFunc != wxCOPY)
{
wxASSERT_MSG(FALSE, wxT("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible")) ;
if (logicalFunc != wxCOPY)
{
wxASSERT_MSG(FALSE, wxT("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible")) ;
void wxSVGFileDC::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoord y , bool WXUNUSED(bTransparent) /*=0*/ )
{
if (m_graphics_changed) NewGraphics ();
void wxSVGFileDC::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoord y , bool WXUNUSED(bTransparent) /*=0*/ )
{
if (m_graphics_changed) NewGraphics ();
sTmp.Printf ( wxT("_image%d.png"), m_sub_images);
sPNG = m_filename.BeforeLast(wxT('.')) + sTmp;
while (wxFile::Exists(sPNG) )
sTmp.Printf ( wxT("_image%d.png"), m_sub_images);
sPNG = m_filename.BeforeLast(wxT('.')) + sTmp;
while (wxFile::Exists(sPNG) )
sTmp.Printf ( wxT("_image%d.png"), m_sub_images);
sPNG = m_filename.BeforeLast(wxT('.')) + sTmp;
}
sTmp.Printf ( wxT("_image%d.png"), m_sub_images);
sPNG = m_filename.BeforeLast(wxT('.')) + sTmp;
}
s = s + sTmp ;
sTmp.Printf ( wxT(" xlink:href=\"%s\"> \n"), sPNG.c_str() );
s = s + sTmp + wxT("<title>Image from wxSVG</title> </image>") + newline;
s = s + sTmp ;
sTmp.Printf ( wxT(" xlink:href=\"%s\"> \n"), sPNG.c_str() );
s = s + sTmp + wxT("<title>Image from wxSVG</title> </image>") + newline;
- const wxWX2MBbuf buf = s.mb_str(wxConvUTF8);
- m_outfile->Write(buf, strlen((const char *)buf));
- m_OK = m_outfile->Ok();
+ const wxWX2MBbuf buf = s.mb_str(wxConvUTF8);
+ m_outfile->Write(buf, strlen((const char *)buf));
+ m_OK = m_outfile->Ok();