2021-04-18 23:11:29 +02:00
|
|
|
using QuestPDF.Helpers;
|
|
|
|
|
|
|
|
|
|
namespace QuestPDF.Infrastructure
|
2021-01-16 01:31:39 +01:00
|
|
|
{
|
|
|
|
|
public class TextStyle
|
|
|
|
|
{
|
2021-04-18 23:11:29 +02:00
|
|
|
internal string Color { get; set; } = Colors.Black;
|
2021-04-28 00:24:26 +02:00
|
|
|
internal string BackgroundColor { get; set; } = Colors.Transparent;
|
2021-04-18 23:11:29 +02:00
|
|
|
internal string FontType { get; set; } = "Calibri";
|
2021-02-08 14:36:12 +01:00
|
|
|
internal float Size { get; set; } = 12;
|
2021-04-28 00:24:26 +02:00
|
|
|
internal float LineHeight { get; set; } = 1f;
|
2021-02-08 14:36:12 +01:00
|
|
|
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
|
|
|
}
|
2021-03-01 16:24:59 +01:00
|
|
|
|
|
|
|
|
internal TextStyle Clone() => (TextStyle)MemberwiseClone();
|
2021-01-16 01:31:39 +01:00
|
|
|
}
|
|
|
|
|
}
|