Exemple #1
0
        // Token: 0x06006B23 RID: 27427 RVA: 0x001EED14 File Offset: 0x001ECF14
        internal void CreateOptimalBreakSession(TextParaClient textParaClient, int dcpStart, int durTrack, LineBreakRecord lineBreakRecord, out OptimalBreakSession optimalBreakSession, out bool isParagraphJustified)
        {
            this._textRunCache = new TextRunCache();
            TextFormatter     textFormatter     = base.StructuralCache.TextFormatterHost.TextFormatter;
            TextLineBreak     previousLineBreak = (lineBreakRecord != null) ? lineBreakRecord.TextLineBreak : null;
            OptimalTextSource optimalTextSource = new OptimalTextSource(base.StructuralCache.TextFormatterHost, base.ParagraphStartCharacterPosition, durTrack, textParaClient, this._textRunCache);

            base.StructuralCache.TextFormatterHost.Context = optimalTextSource;
            TextParagraphCache textParagraphCache = textFormatter.CreateParagraphCache(base.StructuralCache.TextFormatterHost, dcpStart, TextDpi.FromTextDpi(durTrack), this.GetLineProperties(true, dcpStart), previousLineBreak, this._textRunCache);

            base.StructuralCache.TextFormatterHost.Context = null;
            optimalBreakSession  = new OptimalBreakSession(this, textParaClient, textParagraphCache, optimalTextSource);
            isParagraphJustified = ((TextAlignment)base.Element.GetValue(Block.TextAlignmentProperty) == TextAlignment.Justify);
        }
 // ------------------------------------------------------------------
 // Constructor.
 //
 //      PtsContext - Context
 //      TextBreakpoint - Contained breakpoint
 // ------------------------------------------------------------------
 internal LineBreakpoint(OptimalBreakSession optimalBreakSession, TextBreakpoint textBreakpoint) : base(optimalBreakSession.PtsContext)
 {
     _textBreakpoint      = textBreakpoint;
     _optimalBreakSession = optimalBreakSession;
 }
Exemple #3
0
 // ------------------------------------------------------------------
 // Constructor.
 //
 //      PtsContext - Context
 //      TextBreakpoint - Contained breakpoint
 // ------------------------------------------------------------------
 internal LineBreakpoint(OptimalBreakSession optimalBreakSession, TextBreakpoint textBreakpoint) : base(optimalBreakSession.PtsContext)
 {
     _textBreakpoint = textBreakpoint;
     _optimalBreakSession = optimalBreakSession;
 }