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

Method saveGraphicsState

src/text/text-state.ts:199–211  ·  view source on GitHub ↗

* Save graphics state (q operator).

()

Source from the content-addressed store, hash-verified

197 * Save graphics state (q operator).
198 */
199 saveGraphicsState(): void {
200 this.graphicsStateStack.push({
201 ctm: this.ctm.clone(),
202 textState: {
203 charSpacing: this.charSpacing,
204 wordSpacing: this.wordSpacing,
205 horizontalScale: this.horizontalScale,
206 leading: this.leading,
207 rise: this.rise,
208 renderMode: this.renderMode,
209 },
210 });
211 }
212
213 /**
214 * Restore graphics state (Q operator).

Callers 1

processOperationMethod · 0.80

Calls 2

pushMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected