private void OnDeserialized(StreamingContext context) { _offsetCache = new FlowOffsetCache <LineSegment>(_lines); _lineContainer = new LineContainerSupport(CreateLineStrings, "\r"); /// 最初行間を0にしていたのを変更したための措置 // todo: 行間を設定可能にしたときに削除する _lineSpace = 2; }
// ======================================== // constructor // ======================================== public Block() { _offsetCache = new FlowOffsetCache <LineSegment>(_lines); _lineContainer = new LineContainerSupport(CreateLineStrings, "\r"); var lastLine = new LineSegment(new BlockBreak()); _lines.Add(lastLine); lastLine.Parent = this; }
public StyledText(Paragraph para) { if (para == null) { para = new Paragraph(); } _offsetCache = new FlowOffsetCache <Block>(_blocks); _lineContainer = new LineContainerSupport(CreateLineStrings, "\r"); Font = DefaultFont; Add(para); }
private void OnDeserialized(StreamingContext context) { _lineContainer = new LineContainerSupport(CreateLineStrings, "\r"); _offsetCache = new FlowOffsetCache <Block>(_blocks); }