From: <sm...@us...> - 2009-02-19 23:17:14
|
Revision: 9559 http://plplot.svn.sourceforge.net/plplot/?rev=9559&view=rev Author: smekal Date: 2009-02-19 22:48:09 +0000 (Thu, 19 Feb 2009) Log Message: ----------- Applied a patch by Vadim Zeitlin: the header "wx/graphics.h" is now included at the right place and warnings for gcc 4.1 are removed. Modified Paths: -------------- trunk/drivers/wxwidgets.h trunk/drivers/wxwidgets_gc.cpp Modified: trunk/drivers/wxwidgets.h =================================================================== --- trunk/drivers/wxwidgets.h 2009-02-19 22:45:45 UTC (rev 9558) +++ trunk/drivers/wxwidgets.h 2009-02-19 22:48:09 UTC (rev 9559) @@ -304,6 +304,8 @@ #if wxUSE_GRAPHICS_CONTEXT +#include <wx/graphics.h> + class wxPLDevGC : public wxPLDevBase { public: /* methods */ Modified: trunk/drivers/wxwidgets_gc.cpp =================================================================== --- trunk/drivers/wxwidgets_gc.cpp 2009-02-19 22:45:45 UTC (rev 9558) +++ trunk/drivers/wxwidgets_gc.cpp 2009-02-19 22:48:09 UTC (rev 9559) @@ -38,7 +38,6 @@ /* only compile code if wxGraphicsContext available */ #if wxUSE_GRAPHICS_CONTEXT -#include "wx/graphics.h" wxPLDevGC::wxPLDevGC( void ) : wxPLDevBase() { @@ -297,8 +296,10 @@ m_context->Translate( w, 0 ); } - textWidth += w; - textHeight = textHeight>(h+yOffset/scaley) ? textHeight : (h+yOffset/scaley); + textWidth += static_cast<int>(w); + textHeight = textHeight > (h+yOffset/scaley) + ? textHeight + : static_cast<int>((h+yOffset/scaley)); memset( utf8_string, '\0', max_string_length ); } @@ -314,8 +315,9 @@ plP_fci2hex( fci, &fontWeight, PL_FCI_WEIGHT ); if( m_font ) delete m_font; - m_font=wxFont::New(fontSize*fontScale, fontFamilyLookup[fontFamily], - fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); + m_font=wxFont::New(static_cast<int>(fontSize*fontScale), + fontFamilyLookup[fontFamily], + fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); m_font->SetUnderlined( underlined ); m_context->SetFont( *m_font, wxColour(textRed, textGreen, textBlue) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |