X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/053025ac94f0b6e9380b41ce46644b4fc4651a10..7d66cdccd0e78240fda99c122954b4381fa5a6b0:/src/common/dcsvg.cpp diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp index 5e6c73258c..daafe55ff6 100644 --- a/src/common/dcsvg.cpp +++ b/src/common/dcsvg.cpp @@ -26,6 +26,7 @@ #include "wx/dcsvg.h" #include "wx/wfstream.h" +#include "wx/filename.h" #define wxSVG_DEBUG FALSE // or TRUE to see the calls being executed @@ -578,7 +579,7 @@ void wxSVGFileDCImpl::NewGraphics () } sLast.Printf( wxT("stroke-width:%d\" \n transform=\"translate(%.2g %.2g) scale(%.2g %.2g)\">"), - w, (double)m_logicalOriginX, m_logicalOriginY, m_scaleX, m_scaleY ); + w, double(m_logicalOriginX), double(m_logicalOriginY), m_scaleX, m_scaleY ); s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn; write(s); @@ -657,6 +658,10 @@ void wxSVGFileDCImpl::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoor //save it bool bPNG_OK = myBitmap.SaveFile(sPNG,wxBITMAP_TYPE_PNG); +// reference the bitmap from the SVG doc +// only use filename & ext + sPNG = sPNG.AfterLast(wxFileName::GetPathSeparator()); + // refrence the bitmap from the SVG doc int w = myBitmap.GetWidth(); int h = myBitmap.GetHeight();