using PdfSharpCore.Drawing.Layout.enums; namespace PdfSharpCore.Drawing.Layout { /// /// Represents a single word. /// internal class Block { /// /// Initializes a new instance of the class. /// /// The text of the block. /// The type of the block. /// The width of the text. public Block(string text, BlockType type, double width) { Text = text; Type = type; Width = width; } /// /// Initializes a new instance of the class. /// /// The type. public Block(BlockType type) { Type = type; } /// /// The text represented by this block. /// public string Text { get; set; } /// /// The type of the block. /// public BlockType Type { get; } /// /// The width of the text. /// public double Width { get; set; } /// /// The location relative to the upper left corner of the layout rectangle. /// public XPoint Location { get; set; } /// /// The alignment of this line. /// public XParagraphAlignment Alignment { get; set; } /// /// A flag indicating that this is the last block that fits in the layout rectangle. /// public bool Stop { get; set; } /// /// Contains information about spacing of the font /// public FormatterEnvironment Environment { get; set; } /// /// Indent of the text when a new line is started /// public double LineIndent { get; set; } /// /// Skips block for alignment justify calculation, when its the first block in line /// public bool SkipParagraphAlignment { get; set; } /// /// Links this block with the next block /// public bool NextBlockBelongsToMe { get; set; } } }