Esempio n. 1
0
            bool FontFileEnumerator.MoveNext()
            {
                bool moveNext = keyStream.RemainingLength != 0;

                if (moveNext)
                {
                    if (_currentFontFile != null)
                    {
                        _currentFontFile.Dispose();
                    }

                    _currentFontFile    = new FontFile(_factory, keyStream.PositionPointer, 4, _loader);
                    keyStream.Position += 4;
                }
                return(moveNext);
            }
        /// <summary>
        /// Advances to the next font file in the collection. When it is first created, the enumerator is positioned before the first element of the collection and the first call to MoveNext advances to the first file.
        /// </summary>
        /// <returns>
        /// the value TRUE if the enumerator advances to a file; otherwise, FALSE if the enumerator advances past the last file in the collection.
        /// </returns>
        /// <unmanaged>HRESULT IDWriteFontFileEnumerator::MoveNext([Out] BOOL* hasCurrentFile)</unmanaged>
        bool FontFileEnumerator.MoveNext()
        {
            bool moveNext = _keyStream.RemainingLength != 0;

            if (!moveNext)
            {
                return(false);
            }

            _currentFontFile?.Dispose();

            _currentFontFile = new FontFile(_factory, _keyStream.PositionPointer, 4, _loader);

            _keyStream.Position += 4;

            return(true);
        }