/// <summary> /// A function used to copy a glyph image. Note that the created <see cref="Glyph"/> object must be released /// with <see cref="Glyph.Dispose()"/>. /// </summary> /// <returns>A handle to the target glyph object. 0 in case of error.</returns> public Glyph Copy() { Error err = FT.FT_Glyph_Copy(Reference, out var glyphRef); if (err != Error.Ok) { throw new FreeTypeException(err); } return(new Glyph(glyphRef, Library)); }
/// <summary> /// A function used to copy a glyph image. Note that the created <see cref="Glyph"/> object must be released /// with <see cref="Glyph.Dispose()"/>. /// </summary> /// <returns>A handle to the target glyph object. 0 in case of error.</returns> public Glyph Copy() { if (disposed) { throw new ObjectDisposedException("Glyph", "Cannot access a disposed object."); } IntPtr glyphRef; Error err = FT.FT_Glyph_Copy(Reference, out glyphRef); if (err != Error.Ok) { throw new FreeTypeException(err); } return(new Glyph(glyphRef, Library)); }