| 60 | //////////////////////////////////////////////////////////////////////////////// |
| 61 | |
| 62 | void PDFGraphicStackState::updateClip(const MCState& state) { |
| 63 | if (state.clip.isEmpty()) { |
| 64 | return; |
| 65 | } |
| 66 | const auto& currentState = this->currentEntry()->state; |
| 67 | if (currentState.clip.isSame(state.clip) && currentState.matrix == state.matrix) { |
| 68 | return; |
| 69 | } |
| 70 | while (stackDepth > 0) { |
| 71 | pop(); |
| 72 | if (currentState.clip.isSame(state.clip) && currentState.matrix == state.matrix) { |
| 73 | return; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | push(); |
| 78 | this->currentEntry()->state = state; |
| 79 | AppendClip(state, contentStream); |
| 80 | } |
| 81 | |
| 82 | void PDFGraphicStackState::updateMatrix(const Matrix& matrix) { |
| 83 | if (matrix == currentEntry()->matrix) { |
no test coverage detected