/// <summary> /// Returns PDF string representation /// </summary> public string ToPdfString() { var styleBuilder = new StringBuilder(); if (StrokeColor != null) { styleBuilder.AppendFormatLine("{0} RG", StrokeColor.ToPdfString()); } if (FillColor != null) { styleBuilder.AppendFormatLine("{0} rg", FillColor.ToPdfString()); } if (StrokeThickness != null) { styleBuilder.AppendFormatLine("{0} w", TextAdapter.FormatFloat(StrokeThickness.Value)); } if (StrokeType != null) { switch (StrokeType) { case PdfLineType.OutlinedThin: styleBuilder.AppendLine("[2 2] 0 d"); break; case PdfLineType.Outlined: styleBuilder.AppendLine("[4 4] 0 d"); break; case PdfLineType.OutlinedBold: styleBuilder.AppendLine("[6 6] 0 d"); break; } } return(styleBuilder.ToString()); }