FT_New_Library() private method

private FT_New_Library ( IntPtr memory, IntPtr &alibrary ) : System.Error
memory System.IntPtr
alibrary System.IntPtr
return System.Error
Esempio n. 1
0
        private static IntPtr NewLibraryRef(Memory memory)
        {
            Error err = FT.FT_New_Library(memory.Reference, out IntPtr libraryRef);

            if (err == Error.Ok)
            {
                return(libraryRef);
            }
            throw new FreeTypeException(err);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Library"/> class.
        /// </summary>
        /// <param name="memory">A custom FreeType memory manager.</param>
        public Library(Memory memory)
            : this(false)
        {
            IntPtr libraryRef;
            Error  err = FT.FT_New_Library(memory.Reference, out libraryRef);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }

            Reference    = libraryRef;
            customMemory = true;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Library"/> class.
        /// </summary>
        /// <param name="memory">A custom FreeType memory manager.</param>
        public Library(Memory memory)
            : this(false)
        {
            ArchitectureDllImport.LoadArchitectureDependencyDirectory();

            IntPtr libraryRef;
            Error  err = FT.FT_New_Library(memory.Reference, out libraryRef);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }

            Reference    = libraryRef;
            customMemory = true;
        }