예제 #1
0
 /// <summary>
 /// Applies these options to the given script object, and sets initial coordinates.
 /// </summary>
 protected internal virtual void Apply(PdfScriptObject onObject, double x, double y)
 {
     onObject.SetFillColor(this.InkColor);
     onObject.SetFont(this.Font, this.FontSize);
     if (this.LeftRotationDegrees != 0)
     {
         onObject.SetTextRotation(x, y, this.LeftRotationDegrees);
     }
     else
     {
         onObject.SetTextStartPosition(x, y);
     }
     onObject.SetTextRenderingMode(this.RenderingMode);
     if (this.OutlineColor != null)
     {
         onObject.SetStrokeColor(this.OutlineColor);
     }
     if (this.LineDashPattern != null)
     {
         onObject.SetLineDashPattern(this.LineDashPattern);
     }
     if (this.LineCapStyle.HasValue)
     {
         onObject.SetLineCapStyle(this.LineCapStyle.Value);
     }
     if (this.OutlineWidth.HasValue)
     {
         onObject.SetStrokeWidth(this.OutlineWidth.Value);
     }
 }
예제 #2
0
 /// <summary>
 /// Applies these options to the given script object, and sets initial coordinates.
 /// </summary>
 protected internal virtual void Apply(PdfScriptObject onObject, double x, double y)
 {
     onObject.SetFillColor(this.InkColor);
     onObject.SetFont(this.Font, this.FontSize);
     if (this.LeftRotationDegrees != 0)
         onObject.SetTextRotation(x, y, this.LeftRotationDegrees);
     else
         onObject.SetTextStartPosition(x, y);
     onObject.SetTextRenderingMode(this.RenderingMode);
     if (this.OutlineColor != null)
         onObject.SetStrokeColor(this.OutlineColor);
     if (this.LineDashPattern != null)
         onObject.SetLineDashPattern(this.LineDashPattern);
     if (this.LineCapStyle.HasValue)
         onObject.SetLineCapStyle(this.LineCapStyle.Value);
     if (this.OutlineWidth.HasValue)
         onObject.SetStrokeWidth(this.OutlineWidth.Value);
 }