src/providers/Azos.Media/PDF/PdfWriter.cs
/// <summary>
/// Writes PDF path into file stream
/// </summary>
/// <param name="path">PDF path element</param>
Writes PDF path into file stream
Writes PDF path into file stream
internal void Write(PathElement path)
    {
      var x = TextAdapter.FormatFloat(path.X);
      var y = TextAdapter.FormatFloat(path.Y);
      var pathCoordinates = new List<string> { PATH_START_FORMAT.Args(x, y) };
      pathCoordinates.AddRange(path.Primitives.Select(p => p.ToPdfString()));
      var closeTag = path.IsClosed ? "B" : "S";
      var pathContent = new StringBuilder();
      pathContent.AppendLine("q");
      pathContent.Append(path.Style.ToPdfString());
      pathContent.AppendFormatLine(string.Join(Constants.SPACE, pathCoordinates));
      pathContent.AppendLine(closeTag);
      pathContent.Append("Q");
      writeStreamedObject(path.ObjectId, pathContent.ToString());
    }
internal void Write ( PathElement path ) { var x = TextAdapter . FormatFloat ( path . X ) ; var y = TextAdapter . FormatFloat ( path . Y ) ; var pathCoordinates = new List < string > { PATH_START_FORMAT . Args ( x , y ) } ; pathCoordinates . AddRange ( path . Primitives . Select ( p => p . ToPdfString ( ) ) ) ; var closeTag = path . IsClosed ? " " : " " ; var pathContent = new StringBuilder ( ) ; pathContent . AppendLine ( " " ) ; pathContent . Append ( path . Style . ToPdfString ( ) ) ; pathContent . AppendFormatLine ( string . Join ( Constants . SPACE , pathCoordinates ) ) ; pathContent . AppendLine ( closeTag ) ; pathContent . Append ( " " ) ; writeStreamedObject ( path . ObjectId , pathContent . ToString ( ) ) ; }
Writes PDF path into file stream
Writes PDF path into file stream
path
PathElement
PDF path element
PDF path element