internal PtsContext(bool isOptimalParagraphEnabled, TextFormattingMode textFormattingMode)
 {
     this._pages                     = new ArrayList(1);
     this._pageBreakRecords          = new ArrayList(1);
     this._unmanagedHandles          = new PtsContext.HandleIndex[16];
     this._isOptimalParagraphEnabled = isOptimalParagraphEnabled;
     this.BuildFreeList(1);
     this._ptsHost = PtsCache.AcquireContext(this, textFormattingMode);
 }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------
        //
        //  Constructors
        //
        //-------------------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <remarks>
        /// The array of entries initially can store up to 16 entries. Upon
        /// adding elements the capacity increased in multiples of two as
        /// required. The first element always contains index to the next
        /// free entry. All free entries are forming a linked list.
        /// </remarks>
        internal PtsContext(bool isOptimalParagraphEnabled, TextFormattingMode textFormattingMode)
        {
            _pages                     = new ArrayList(1);
            _pageBreakRecords          = new ArrayList(1);
            _unmanagedHandles          = new HandleIndex[_defaultHandlesCapacity]; // Limit initial size
            _isOptimalParagraphEnabled = isOptimalParagraphEnabled;

            BuildFreeList(1); // 1 is the first free index in UnmanagedHandles array

            // Acquire PTS Context
            _ptsHost = PtsCache.AcquireContext(this, textFormattingMode);
        }