MCPcopy Create free account
hub / github.com/LibPDF-js/core / restoreGraphicsState

Method restoreGraphicsState

src/text/text-state.ts:216–228  ·  view source on GitHub ↗

* Restore graphics state (Q operator).

()

Source from the content-addressed store, hash-verified

214 * Restore graphics state (Q operator).
215 */
216 restoreGraphicsState(): void {
217 const saved = this.graphicsStateStack.pop();
218
219 if (saved) {
220 this.ctm = saved.ctm;
221 this.charSpacing = saved.textState.charSpacing;
222 this.wordSpacing = saved.textState.wordSpacing;
223 this.horizontalScale = saved.textState.horizontalScale;
224 this.leading = saved.textState.leading;
225 this.rise = saved.textState.rise;
226 this.renderMode = saved.textState.renderMode;
227 }
228 }
229
230 /**
231 * Modify current transformation matrix (cm operator).

Callers 1

processOperationMethod · 0.80

Calls 1

popMethod · 0.80

Tested by

no test coverage detected