Make wxSVGFileDC function parameter names consistent with wxDC
This commit is contained in:
@@ -488,11 +488,11 @@ wxSVGFileDCImpl::wxSVGFileDCImpl(wxSVGFileDC* owner, const wxString& filename,
|
||||
Init(filename, width, height, dpi, title);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::Init(const wxString& filename, int Width, int Height,
|
||||
void wxSVGFileDCImpl::Init(const wxString& filename, int width, int height,
|
||||
double dpi, const wxString& title)
|
||||
{
|
||||
m_width = Width;
|
||||
m_height = Height;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
m_dpi = dpi;
|
||||
|
||||
@@ -532,7 +532,7 @@ void wxSVGFileDCImpl::Init(const wxString& filename, int Width, int Height,
|
||||
s += wxS("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
|
||||
s += wxS("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n\n");
|
||||
s += wxS("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"");
|
||||
s += wxString::Format(wxS(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d\">\n"), NumStr(float(Width) / dpi * 2.54), NumStr(float(Height) / dpi * 2.54), Width, Height);
|
||||
s += wxString::Format(wxS(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d\">\n"), NumStr(float(m_width) / dpi * 2.54), NumStr(float(m_height) / dpi * 2.54), m_width, m_height);
|
||||
s += wxString::Format(wxS("<title>%s</title>\n"), title);
|
||||
s += wxString(wxS("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxS("</desc>\n\n");
|
||||
s += wxS("<g style=\"fill:black; stroke:black; stroke-width:1\">\n");
|
||||
@@ -615,7 +615,7 @@ void wxSVGFileDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset
|
||||
}
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawPoint(wxCoord x1, wxCoord y1)
|
||||
void wxSVGFileDCImpl::DoDrawPoint(wxCoord x, wxCoord y)
|
||||
{
|
||||
NewGraphicsIfNeeded();
|
||||
|
||||
@@ -624,15 +624,15 @@ void wxSVGFileDCImpl::DoDrawPoint(wxCoord x1, wxCoord y1)
|
||||
s = wxS(" <g style=\"stroke-width:1; stroke-linecap:round;\">\n ");
|
||||
write(s);
|
||||
|
||||
DoDrawLine(x1, y1, x1, y1);
|
||||
DoDrawLine(x, y, x, y);
|
||||
|
||||
s = wxS(" </g>\n");
|
||||
write(s);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x1, wxCoord y1)
|
||||
void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
|
||||
{
|
||||
DoDrawRotatedText(text, x1, y1, 0.0);
|
||||
DoDrawRotatedText(text, x, y, 0.0);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoord y, double angle)
|
||||
@@ -752,7 +752,7 @@ void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoor
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{
|
||||
DoDrawRoundedRectangle(x, y, width, height, 0);
|
||||
DoDrawRoundedRectangle(x, y, width, height, 0.0);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius)
|
||||
@@ -1093,7 +1093,7 @@ void wxSVGFileDCImpl::DoGradientFillConcentric(const wxRect& rect,
|
||||
CalcBoundingBox(rect.x + rect.width, rect.y + rect.height);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoSetClippingRegion(int x, int y, int width, int height)
|
||||
void wxSVGFileDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{
|
||||
wxString svg;
|
||||
|
||||
@@ -1152,16 +1152,16 @@ void wxSVGFileDCImpl::DestroyClippingRegion()
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoGetTextExtent(const wxString& string,
|
||||
wxCoord* w,
|
||||
wxCoord* h,
|
||||
wxCoord* x,
|
||||
wxCoord* y,
|
||||
wxCoord* descent,
|
||||
wxCoord* externalLeading,
|
||||
const wxFont* font) const
|
||||
const wxFont* theFont) const
|
||||
{
|
||||
wxScreenDC sDC;
|
||||
SetScaledScreenDCFont(sDC, font ? *font : m_font);
|
||||
SetScaledScreenDCFont(sDC, theFont ? *theFont : m_font);
|
||||
|
||||
sDC.GetTextExtent(string, w, h, descent, externalLeading);
|
||||
sDC.GetTextExtent(string, x, y, descent, externalLeading);
|
||||
}
|
||||
|
||||
wxCoord wxSVGFileDCImpl::GetCharHeight() const
|
||||
@@ -1261,13 +1261,15 @@ void wxSVGFileDCImpl::SetFont(const wxFont& font)
|
||||
m_font = font;
|
||||
}
|
||||
|
||||
// export a bitmap as a raster image in png
|
||||
bool wxSVGFileDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC* source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode logicalFunc /*= wxCOPY*/, bool useMask /*= false*/,
|
||||
wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/)
|
||||
bool wxSVGFileDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord width, wxCoord height,
|
||||
wxDC* source,
|
||||
wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode rop,
|
||||
bool useMask,
|
||||
wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask))
|
||||
{
|
||||
if (logicalFunc != wxCOPY)
|
||||
if (rop != wxCOPY)
|
||||
{
|
||||
wxASSERT_MSG(false, wxS("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible"));
|
||||
return false;
|
||||
@@ -1286,17 +1288,18 @@ bool wxSVGFileDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoor
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawIcon(const wxIcon& myIcon, wxCoord x, wxCoord y)
|
||||
void wxSVGFileDCImpl::DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
|
||||
{
|
||||
wxBitmap myBitmap(myIcon.GetWidth(), myIcon.GetHeight());
|
||||
wxBitmap myBitmap(icon.GetWidth(), icon.GetHeight());
|
||||
wxMemoryDC memDC;
|
||||
memDC.SelectObject(myBitmap);
|
||||
memDC.DrawIcon(myIcon, 0, 0);
|
||||
memDC.DrawIcon(icon, 0, 0);
|
||||
memDC.SelectObject(wxNullBitmap);
|
||||
DoDrawBitmap(myBitmap, x, y);
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::DoDrawBitmap(const wxBitmap& bmp, wxCoord x, wxCoord y, bool WXUNUSED(bTransparent))
|
||||
void wxSVGFileDCImpl::DoDrawBitmap(const wxBitmap& bmp, wxCoord x, wxCoord y,
|
||||
bool WXUNUSED(useMask))
|
||||
{
|
||||
NewGraphicsIfNeeded();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user