private FT_New_Library ( |
||
memory | ||
alibrary | ||
Résultat | System.Error |
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); }
/// <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; }
/// <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; }