]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_image.cpp
Added some missing tests; replaced scrolwin.cpp with scrlwng.cpp
[wxWidgets.git] / src / html / m_image.cpp
index 4f94570ff07e5bc93e1415e311bfc55c2c0fd05a..8edf713086b090211f5b992c7e86aacff8241de9 100644 (file)
@@ -347,8 +347,8 @@ void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
         dc.SetUserScale(us_x * m_Scale, us_y * m_Scale);
     
 //      dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, (m_Image->GetMask() != (wxMask*) 0));
-        dc.DrawBitmap(*m_Image, (x + m_PosX) / m_Scale
-                                (y + m_PosY) / m_Scale, TRUE);
+        dc.DrawBitmap(*m_Image, (int) ((x + m_PosX) / m_Scale)
+                                (int) ((y + m_PosY) / m_Scale), TRUE);
         dc.SetUserScale(us_x, us_y);
     }
     wxHtmlCell::Draw(dc, x, y, view_y1, view_y2);
@@ -404,20 +404,24 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
                 wxString mn = wxEmptyString;
 
                 str = m_WParser->GetFS()->OpenFile(tmp);
-                if (tag.HasParam(wxT("WIDTH"))) tag.ScanParam(wxT("WIDTH"), wxT("%i"), &w);
-                if (tag.HasParam(wxT("HEIGHT"))) tag.ScanParam(wxT("HEIGHT"), wxT("%i"), &h);
+                if (tag.HasParam(wxT("WIDTH"))) 
+                    tag.GetParamAsInt(wxT("WIDTH"), &w);
+                if (tag.HasParam(wxT("HEIGHT"))) 
+                    tag.GetParamAsInt(wxT("HEIGHT"), &h);
                 al = wxHTML_ALIGN_BOTTOM;
                 if (tag.HasParam(wxT("ALIGN"))) 
                        {
                     wxString alstr = tag.GetParam(wxT("ALIGN"));
                     alstr.MakeUpper();  // for the case alignment was in ".."
-                    if (alstr == wxT("TEXTTOP")) al = wxHTML_ALIGN_TOP;
-                    else if ((alstr == wxT("CENTER")) || (alstr == wxT("ABSCENTER"))) al = wxHTML_ALIGN_CENTER;
+                    if (alstr == wxT("TEXTTOP")) 
+                        al = wxHTML_ALIGN_TOP;
+                    else if ((alstr == wxT("CENTER")) || (alstr == wxT("ABSCENTER"))) 
+                        al = wxHTML_ALIGN_CENTER;
                 }
                 if (tag.HasParam(wxT("USEMAP"))) 
                        {
                     mn = tag.GetParam( wxT("USEMAP") );
-                    if (mn[ (unsigned int) 0 ] == wxT('#')) 
+                    if (mn.GetChar(0) == wxT('#')) 
                            {
                         mn = mn.Mid( 1 );
                     }