/// <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); } }
/// <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); } }
/// <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); }