src/providers/Azos.Media/PDF/PdfWriter.cs
/// <summary>
/// Writes PDF rectangle element into file stream
/// </summary>
/// <param name="rectangle">PDF rectangle element</param>
Writes PDF rectangle element into file stream
Writes PDF rectangle element into file stream
internal void Write(RectangleElement rectangle)
    {
      var x = TextAdapter.FormatFloat(rectangle.X);
      var y = TextAdapter.FormatFloat(rectangle.Y);
      var w = TextAdapter.FormatFloat(rectangle.X1 - rectangle.X);
      var h = TextAdapter.FormatFloat(rectangle.Y1 - rectangle.Y);
      var rectangleContent = new StringBuilder();
      rectangleContent.AppendLine("q");
      rectangleContent.Append(rectangle.Style.ToPdfString());
      rectangleContent.AppendFormatLine("{0} {1} {2} {3} re", x, y, w, h);
      rectangleContent.AppendLine("B");
      rectangleContent.Append("Q");
      writeStreamedObject(rectangle.ObjectId, rectangleContent.ToString());
    }
internal void Write ( RectangleElement rectangle ) { var x = TextAdapter . FormatFloat ( rectangle . X ) ; var y = TextAdapter . FormatFloat ( rectangle . Y ) ; var w = TextAdapter . FormatFloat ( rectangle . X1 - rectangle . X ) ; var h = TextAdapter . FormatFloat ( rectangle . Y1 - rectangle . Y ) ; var rectangleContent = new StringBuilder ( ) ; rectangleContent . AppendLine ( " " ) ; rectangleContent . Append ( rectangle . Style . ToPdfString ( ) ) ; rectangleContent . AppendFormatLine ( " " , x , y , w , h ) ; rectangleContent . AppendLine ( " " ) ; rectangleContent . Append ( " " ) ; writeStreamedObject ( rectangle . ObjectId , rectangleContent . ToString ( ) ) ; }
Writes PDF rectangle element into file stream
Writes PDF rectangle element into file stream
rectangle
RectangleElement
PDF rectangle element
PDF rectangle element