X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0413cec5271566470f4c852608a35800b49056cd..170cbe33dc9fa4255ed19b3d0b321e3daf204416:/src/html/m_image.cpp?ds=sidebyside diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index a7f1f297e7..35165bb4f4 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -306,6 +306,7 @@ wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, int align, wxStr void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { if (m_Image) +// dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, (m_Image->GetMask() != (wxMask*) 0)); dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, TRUE); wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } @@ -372,10 +373,10 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA") } wxHtmlImageCell *cel = NULL; if (str) { - cel = new wxHtmlImageCell(str, - (int)(m_WParser -> GetPixelScale() * (double)w), - (int)(m_WParser -> GetPixelScale() * (double)h), - al, mn); + int neww = (w == -1) ? -1 : (int)(m_WParser -> GetPixelScale() * (double)w), + newh = (h == -1) ? -1 : (int)(m_WParser -> GetPixelScale() * (double)h); + + cel = new wxHtmlImageCell(str, neww, newh, al, mn); cel -> SetLink(m_WParser -> GetLink()); m_WParser -> GetContainer() -> InsertCell(cel); delete str;