public void WriteSaveState(string traceMessage, string elementName)
{
//Debug.Assert(this.streamMode == StreamMode.Graphic, "Cannot restore state in text mode.");
if (traceMessage == null || this.traceLevel == PdfTraceLevel.None)
WriteLiteral("q\n");
else
{
if (!String.IsNullOrEmpty(elementName))
traceMessage = traceMessage + ": '" + elementName + "'";
WriteLiteral("q % -- " + traceMessage + "\n");
}
this.graphicsStateStack.Push(this.graphicsState);
this.graphicsState = this.graphicsState.Clone();
this.graphicsState.Level = this.graphicsStateStack.Count;
}