| Index: core/fxge/ge/fx_ge_ps.cpp
|
| diff --git a/core/fxge/ge/fx_ge_ps.cpp b/core/fxge/ge/fx_ge_ps.cpp
|
| index 98253336a15c6ad30fd2de43c3a3e3c7d6b20e40..b112cf363047b8f69172965cc4c1adb755da7364 100644
|
| --- a/core/fxge/ge/fx_ge_ps.cpp
|
| +++ b/core/fxge/ge/fx_ge_ps.cpp
|
| @@ -77,19 +77,25 @@ void CFX_PSRenderer::SaveState() {
|
| OUTPUT_PS("q\n");
|
| m_ClipBoxStack.Add(m_ClipBox);
|
| }
|
| -void CFX_PSRenderer::RestoreState(FX_BOOL bKeepSaved) {
|
| +
|
| +void CFX_PSRenderer::RestoreState(bool bKeepSaved) {
|
| StartRendering();
|
| if (bKeepSaved) {
|
| OUTPUT_PS("Q\nq\n");
|
| } else {
|
| OUTPUT_PS("Q\n");
|
| }
|
| - m_bColorSet = m_bGraphStateSet = FALSE;
|
| - m_ClipBox = m_ClipBoxStack.GetAt(m_ClipBoxStack.GetSize() - 1);
|
| - if (!bKeepSaved) {
|
| - m_ClipBoxStack.RemoveAt(m_ClipBoxStack.GetSize() - 1);
|
| - }
|
| + m_bColorSet = FALSE;
|
| + m_bGraphStateSet = FALSE;
|
| + int size = m_ClipBoxStack.GetSize();
|
| + if (!size)
|
| + return;
|
| +
|
| + m_ClipBox = m_ClipBoxStack.GetAt(size - 1);
|
| + if (!bKeepSaved)
|
| + m_ClipBoxStack.RemoveAt(size - 1);
|
| }
|
| +
|
| void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData,
|
| const CFX_Matrix* pObject2Device) {
|
| int nPoints = pPathData->GetPointCount();
|
|
|