Loading 3d-viewer/x3dmodelparser.cpp +31 −25 Original line number Diff line number Diff line Loading @@ -36,8 +36,10 @@ #include <queue> #include <vector> #include "3d_struct.h" #include "modelparsers.h" #include <3d_struct.h> #include <modelparsers.h> #include <xnode.h> X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) : S3D_MODEL_PARSER( aMaster ) Loading @@ -54,13 +56,13 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) if( !doc.Load( aFilename ) ) { wxLogError( wxT( "Error while parsing file <%s>" ), GetChars( aFilename ) ); wxLogError( wxT( "Error while parsing file '%s'" ), GetChars( aFilename ) ); return; } if( doc.GetRoot()->GetName() != wxT( "X3D" ) ) { wxLogError( wxT( "Filetype is not X3D <%s>" ), GetChars( aFilename ) ); wxLogError( wxT( "Filetype is not X3D '%s'" ), GetChars( aFilename ) ); return; } Loading @@ -85,7 +87,8 @@ wxString X3D_MODEL_PARSER::VRML_representation() for( unsigned i = 0; i < vrml_points.size(); i++ ) { output += wxT( "Shape {\n" output += wxT( "Shape {\n" " appearance Appearance {\n" " material Material {\n" ) + vrml_materials[i] + Loading Loading @@ -115,6 +118,7 @@ void X3D_MODEL_PARSER::GetChildsByName( wxXmlNode* aParent, { // Breadth-first search (BFS) std::queue< wxXmlNode* > found; found.push( aParent ); while( !found.empty() ) Loading @@ -140,7 +144,7 @@ void X3D_MODEL_PARSER::GetChildsByName( wxXmlNode* aParent, void X3D_MODEL_PARSER::GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps ) { wxXmlProperty *prop; wxXmlAttribute* prop; for( prop = aNode->GetAttributes(); prop != NULL; Loading @@ -167,6 +171,7 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode ) childnodes.clear(); PROPERTY_MAP properties; GetNodeProperties( aTransformNode, properties ); GetChildsByName( aTransformNode, wxT("IndexedFaceSet"), childnodes ); Loading Loading @@ -270,8 +275,8 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) { if( material->m_Name == mat_name ) { wxString vrml_material; vrml_material.Append( wxString::Format( wxT( "specularColor %f %f %f\n" ), material->m_SpecularColor.x, material->m_SpecularColor.y, Loading Loading @@ -457,6 +462,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, while( index_tokens.HasMoreTokens() ) { long index = 0; index_tokens.GetNextToken().ToLong( &index ); // -1 marks the end of polygon Loading common/basicframe.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,12 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() " (release," #endif __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 ")" #if !wxCHECK_VERSION( 3, 0, 0 ) __WX_BO_WXWIN_COMPAT_2_6 #endif __WX_BO_WXWIN_COMPAT_2_8 ")" ; } Loading common/class_layer_box_selector.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -41,7 +41,12 @@ void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer ) // Prepare Bitmap bmpDC.SelectObject( aLayerbmp ); brush.SetColour( MakeColour( GetLayerColor( aLayer ) ) ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); #else brush.SetStyle( wxSOLID ); #endif bmpDC.SetBrush( brush ); bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() ); Loading common/gr_basic.cpp +12 −5 Original line number Diff line number Diff line Loading @@ -396,15 +396,22 @@ void GRSetBrush( wxDC* DC, EDA_COLOR_T Color, bool fill ) || s_DC_lastbrushfill != fill || s_DC_lastDC != DC ) { wxBrush DrawBrush; DrawBrush.SetColour( MakeColour( Color ) ); wxBrush brush; brush.SetColour( MakeColour( Color ) ); if( fill ) DrawBrush.SetStyle( wxSOLID ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); else brush.SetStyle( wxBRUSHSTYLE_TRANSPARENT ); #else brush.SetStyle( wxSOLID ); else DrawBrush.SetStyle( wxTRANSPARENT ); brush.SetStyle( wxTRANSPARENT ); #endif DC->SetBrush( DrawBrush ); DC->SetBrush( brush ); s_DC_lastbrushcolor = Color; s_DC_lastbrushfill = fill; Loading common/msgpanel.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -239,7 +239,12 @@ void EDA_MSG_PANEL::erase( wxDC* aDC ) pen.SetColour( color ); brush.SetColour( color ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); #else brush.SetStyle( wxSOLID ); #endif aDC->SetPen( pen ); aDC->SetBrush( brush ); Loading Loading
3d-viewer/x3dmodelparser.cpp +31 −25 Original line number Diff line number Diff line Loading @@ -36,8 +36,10 @@ #include <queue> #include <vector> #include "3d_struct.h" #include "modelparsers.h" #include <3d_struct.h> #include <modelparsers.h> #include <xnode.h> X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) : S3D_MODEL_PARSER( aMaster ) Loading @@ -54,13 +56,13 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename ) if( !doc.Load( aFilename ) ) { wxLogError( wxT( "Error while parsing file <%s>" ), GetChars( aFilename ) ); wxLogError( wxT( "Error while parsing file '%s'" ), GetChars( aFilename ) ); return; } if( doc.GetRoot()->GetName() != wxT( "X3D" ) ) { wxLogError( wxT( "Filetype is not X3D <%s>" ), GetChars( aFilename ) ); wxLogError( wxT( "Filetype is not X3D '%s'" ), GetChars( aFilename ) ); return; } Loading @@ -85,7 +87,8 @@ wxString X3D_MODEL_PARSER::VRML_representation() for( unsigned i = 0; i < vrml_points.size(); i++ ) { output += wxT( "Shape {\n" output += wxT( "Shape {\n" " appearance Appearance {\n" " material Material {\n" ) + vrml_materials[i] + Loading Loading @@ -115,6 +118,7 @@ void X3D_MODEL_PARSER::GetChildsByName( wxXmlNode* aParent, { // Breadth-first search (BFS) std::queue< wxXmlNode* > found; found.push( aParent ); while( !found.empty() ) Loading @@ -140,7 +144,7 @@ void X3D_MODEL_PARSER::GetChildsByName( wxXmlNode* aParent, void X3D_MODEL_PARSER::GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps ) { wxXmlProperty *prop; wxXmlAttribute* prop; for( prop = aNode->GetAttributes(); prop != NULL; Loading @@ -167,6 +171,7 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode ) childnodes.clear(); PROPERTY_MAP properties; GetNodeProperties( aTransformNode, properties ); GetChildsByName( aTransformNode, wxT("IndexedFaceSet"), childnodes ); Loading Loading @@ -270,8 +275,8 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) { if( material->m_Name == mat_name ) { wxString vrml_material; vrml_material.Append( wxString::Format( wxT( "specularColor %f %f %f\n" ), material->m_SpecularColor.x, material->m_SpecularColor.y, Loading Loading @@ -457,6 +462,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, while( index_tokens.HasMoreTokens() ) { long index = 0; index_tokens.GetNextToken().ToLong( &index ); // -1 marks the end of polygon Loading
common/basicframe.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,12 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() " (release," #endif __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 ")" #if !wxCHECK_VERSION( 3, 0, 0 ) __WX_BO_WXWIN_COMPAT_2_6 #endif __WX_BO_WXWIN_COMPAT_2_8 ")" ; } Loading
common/class_layer_box_selector.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -41,7 +41,12 @@ void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer ) // Prepare Bitmap bmpDC.SelectObject( aLayerbmp ); brush.SetColour( MakeColour( GetLayerColor( aLayer ) ) ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); #else brush.SetStyle( wxSOLID ); #endif bmpDC.SetBrush( brush ); bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() ); Loading
common/gr_basic.cpp +12 −5 Original line number Diff line number Diff line Loading @@ -396,15 +396,22 @@ void GRSetBrush( wxDC* DC, EDA_COLOR_T Color, bool fill ) || s_DC_lastbrushfill != fill || s_DC_lastDC != DC ) { wxBrush DrawBrush; DrawBrush.SetColour( MakeColour( Color ) ); wxBrush brush; brush.SetColour( MakeColour( Color ) ); if( fill ) DrawBrush.SetStyle( wxSOLID ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); else brush.SetStyle( wxBRUSHSTYLE_TRANSPARENT ); #else brush.SetStyle( wxSOLID ); else DrawBrush.SetStyle( wxTRANSPARENT ); brush.SetStyle( wxTRANSPARENT ); #endif DC->SetBrush( DrawBrush ); DC->SetBrush( brush ); s_DC_lastbrushcolor = Color; s_DC_lastbrushfill = fill; Loading
common/msgpanel.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -239,7 +239,12 @@ void EDA_MSG_PANEL::erase( wxDC* aDC ) pen.SetColour( color ); brush.SetColour( color ); #if wxCHECK_VERSION( 3, 0, 0 ) brush.SetStyle( wxBRUSHSTYLE_SOLID ); #else brush.SetStyle( wxSOLID ); #endif aDC->SetPen( pen ); aDC->SetBrush( brush ); Loading