Exemple #1
0
        private void OnDeserialized(StreamingContext context)
        {
            _offsetCache   = new FlowOffsetCache <LineSegment>(_lines);
            _lineContainer = new LineContainerSupport(CreateLineStrings, "\r");

            /// 最初行間を0にしていたのを変更したための措置
            // todo: 行間を設定可能にしたときに削除する
            _lineSpace = 2;
        }
Exemple #2
0
        // ========================================
        // 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;
        }
Exemple #3
0
        public StyledText(Paragraph para)
        {
            if (para == null)
            {
                para = new Paragraph();
            }

            _offsetCache = new FlowOffsetCache <Block>(_blocks);

            _lineContainer = new LineContainerSupport(CreateLineStrings, "\r");

            Font = DefaultFont;
            Add(para);
        }
Exemple #4
0
 private void OnDeserialized(StreamingContext context)
 {
     _lineContainer = new LineContainerSupport(CreateLineStrings, "\r");
     _offsetCache   = new FlowOffsetCache <Block>(_blocks);
 }