PdfSharp.Xps.Rendering.PdfContentWriter.WriteSaveState C# (CSharp) Méthode

WriteSaveState() public méthode

Saves the current graphical state and writes a push state operator to the content stream.
public WriteSaveState ( string traceMessage, string elementName ) : void
traceMessage string
elementName string
Résultat void
    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;
    }