MCPcopy Create free account
hub / github.com/Tencent/tgfx / updateClip

Method updateClip

src/pdf/PDFGraphicStackState.cpp:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60////////////////////////////////////////////////////////////////////////////////
61
62void 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
82void PDFGraphicStackState::updateMatrix(const Matrix& matrix) {
83 if (matrix == currentEntry()->matrix) {

Callers 1

setUpContentEntryMethod · 0.80

Calls 4

currentEntryMethod · 0.95
AppendClipFunction · 0.85
isSameMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected