Пример #1
0
        /// <summary>
        /// Add a new module to a given library instance.
        /// </summary>
        /// <remarks>
        /// An error will be returned if a module already exists by that name, or if the module requires a version of
        /// FreeType that is too great.
        /// </remarks>
        /// <param name="clazz">A pointer to class descriptor for the module.</param>
        public void AddModule(ModuleClass clazz)
        {
            Error err = FT.FT_Add_Module(Reference, clazz.Reference);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Пример #2
0
        /// <summary>
        /// Add a new module to a given library instance.
        /// </summary>
        /// <remarks>
        /// An error will be returned if a module already exists by that name, or if the module requires a version of
        /// FreeType that is too great.
        /// </remarks>
        /// <param name="clazz">A pointer to class descriptor for the module.</param>
        public void AddModule(ModuleClass clazz)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Library", "Cannot access a disposed object.");
            }

            Error err = FT.FT_Add_Module(Reference, clazz.Reference);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Пример #3
0
        /// <summary>
        /// Add a new module to a given library instance.
        /// </summary>
        /// <remarks>
        /// An error will be returned if a module already exists by that name, or if the module requires a version of
        /// FreeType that is too great.
        /// </remarks>
        /// <param name="clazz">A pointer to class descriptor for the module.</param>
        public void AddModule(ModuleClass clazz)
        {
            if (disposed)
                throw new ObjectDisposedException("Library", "Cannot access a disposed object.");

            Error err = FT.FT_Add_Module(Reference, clazz.Reference);

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