Files
QuestPDF/QuestPDF/Infrastructure/TextStyle.cs
T

26 lines
998 B
C#
Raw Normal View History

using QuestPDF.Helpers;
namespace QuestPDF.Infrastructure
2021-01-16 01:31:39 +01:00
{
public class TextStyle
{
internal string Color { get; set; } = Colors.Black;
2021-04-28 00:24:26 +02:00
internal string BackgroundColor { get; set; } = Colors.Transparent;
internal string FontType { get; set; } = "Calibri";
internal float Size { get; set; } = 12;
2021-04-28 00:24:26 +02:00
internal float LineHeight { get; set; } = 1f;
internal HorizontalAlignment Alignment { get; set; } = HorizontalAlignment.Left;
internal FontWeight FontWeight { get; set; } = FontWeight.Normal;
internal bool IsItalic { get; set; } = false;
2021-04-28 00:24:26 +02:00
internal bool IsDense { get; set; }
2021-01-16 01:31:39 +01:00
public static TextStyle Default => new TextStyle();
public override string ToString()
{
2021-04-28 00:24:26 +02:00
return $"{Color}|{BackgroundColor}|{FontType}|{Size}|{LineHeight}|{Alignment}|{FontWeight}|{IsItalic}|{IsDense}";
2021-01-16 01:31:39 +01:00
}
internal TextStyle Clone() => (TextStyle)MemberwiseClone();
2021-01-16 01:31:39 +01:00
}
}