VC6 has problems with std::vector and identifiers names 'iterator' in GDI+ headers; switch to using our own stack class instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,13 +36,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/graphics.h"
|
#include "wx/graphics.h"
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include "wx/msw/wrapgdip.h"
|
#include "wx/msw/wrapgdip.h"
|
||||||
|
|
||||||
|
#include "wx/stack.h"
|
||||||
|
|
||||||
|
WX_DECLARE_STACK(GraphicsState, GraphicsStates);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -310,7 +309,7 @@ private:
|
|||||||
void SetDefaults();
|
void SetDefaults();
|
||||||
|
|
||||||
Graphics* m_context;
|
Graphics* m_context;
|
||||||
vector<GraphicsState> m_stateStack;
|
GraphicsStates m_stateStack;
|
||||||
GraphicsState m_state1;
|
GraphicsState m_state1;
|
||||||
GraphicsState m_state2;
|
GraphicsState m_state2;
|
||||||
|
|
||||||
@@ -953,13 +952,13 @@ void wxGDIPlusContext::Scale( wxDouble xScale , wxDouble yScale )
|
|||||||
void wxGDIPlusContext::PushState()
|
void wxGDIPlusContext::PushState()
|
||||||
{
|
{
|
||||||
GraphicsState state = m_context->Save();
|
GraphicsState state = m_context->Save();
|
||||||
m_stateStack.push_back(state);
|
m_stateStack.push(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGDIPlusContext::PopState()
|
void wxGDIPlusContext::PopState()
|
||||||
{
|
{
|
||||||
GraphicsState state = m_stateStack.back();
|
GraphicsState state = m_stateStack.top();
|
||||||
m_stateStack.pop_back();
|
m_stateStack.pop();
|
||||||
m_context->Restore(state);
|
m_context->Restore(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user