/// <summary> /// Copy a bitmap into another one. /// </summary> /// <param name="library">A handle to a library object.</param> /// <returns>A handle to the target bitmap.</returns> public FTBitmap Copy(Library library) { if (disposed) { throw new ObjectDisposedException("FTBitmap", "Cannot access a disposed object."); } if (library == null) { throw new ArgumentNullException("library"); } FTBitmap newBitmap = new FTBitmap(library); IntPtr bmpRef = newBitmap.reference; Error err = FT.FT_Bitmap_Copy(library.Reference, Reference, bmpRef); newBitmap.Reference = bmpRef; if (err != Error.Ok) { throw new FreeTypeException(err); } return(newBitmap); }
/// <summary> /// Copy a bitmap into another one. /// </summary> /// <param name="library">A handle to a library object.</param> /// <returns>A handle to the target bitmap.</returns> public FTBitmap Copy(Library library) { if (library == null) { throw new ArgumentNullException("library"); } FTBitmap newBitmap = new FTBitmap(library); IntPtr bmpRef = newBitmap.Reference; Error err = FT.FT_Bitmap_Copy(library.Reference, Reference, bmpRef); if (err != Error.Ok) { throw new FreeTypeException(err); } return(newBitmap); }