PdfSharp.Drawing.XGraphics.WriteComment C# (CSharp) Method

WriteComment() public method

Writes a comment to the output stream. Comments have no effect on the rendering of the output. They may be useful to mark a position in a content stream of a PDF document.
public WriteComment ( string comment ) : void
comment string
return void
    public void WriteComment(string comment)
    {
      if (comment == null)
        throw new ArgumentNullException("comment");

      if (this.drawGraphics)
      {
        // TODO: Do something if metafile?
      }

      if (this.renderer != null)
        this.renderer.WriteComment(comment);
    }

Usage Example

Ejemplo n.º 1
0
    public override void RenderPage(XGraphics gfx)
    {
      base.RenderPage(gfx);
      DrawGridlines(gfx);

      // Create a new graphical path
      XGraphicsPath path = new XGraphicsPath();

      XSize size = new XSize(90, 140);
      double rotationAngle = 130;

      path.AddArc(new XPoint(100, 100), new XPoint(200, 200), size, rotationAngle, false, System.Windows.Media.SweepDirection.Clockwise);
      path.StartFigure();
      path.AddArc(new XPoint(400, 100), new XPoint(500, 200), size, rotationAngle, false, System.Windows.Media.SweepDirection.Counterclockwise);
      path.StartFigure();
      path.AddArc(new XPoint(100, 300), new XPoint(200, 400), size, rotationAngle, true, System.Windows.Media.SweepDirection.Clockwise);
      path.StartFigure();
      path.AddArc(new XPoint(400, 300), new XPoint(500, 400), size, rotationAngle, true, System.Windows.Media.SweepDirection.Counterclockwise);
      path.StartFigure();

#if DEBUG_
      gfx.WriteComment("PathArcSegment");
#endif
      gfx.DrawPath(XPens.Red, path);
    }
All Usage Examples Of PdfSharp.Drawing.XGraphics::WriteComment