Adding 'TextDirection.Rotate180'

This commit is contained in:
BobLd
2019-04-23 21:49:29 +01:00
parent 70852c2855
commit afd9cb9f26
2 changed files with 10 additions and 5 deletions

View File

@@ -87,6 +87,10 @@
{ {
if (System.Math.Abs(StartBaseLine.Y - EndBaseLine.Y) < 10e-5m) if (System.Math.Abs(StartBaseLine.Y - EndBaseLine.Y) < 10e-5m)
{ {
if (StartBaseLine.X > EndBaseLine.X)
{
return TextDirection.Rotate180;
}
return TextDirection.Horizontal; return TextDirection.Horizontal;
} }
else if (System.Math.Abs(StartBaseLine.X - EndBaseLine.X) < 10e-5m) else if (System.Math.Abs(StartBaseLine.X - EndBaseLine.X) < 10e-5m)

View File

@@ -1,8 +1,4 @@
using System; namespace UglyToad.PdfPig.Content
using System.Collections.Generic;
using System.Text;
namespace UglyToad.PdfPig.Content
{ {
/// <summary> /// <summary>
/// Direction of the text. /// Direction of the text.
@@ -19,6 +15,11 @@ namespace UglyToad.PdfPig.Content
/// </summary> /// </summary>
Horizontal, Horizontal,
/// <summary>
/// Horizontal text, upside down.
/// </summary>
Rotate180,
/// <summary> /// <summary>
/// Rotated text going down. /// Rotated text going down.
/// </summary> /// </summary>