FT_Glyph_Copy() private method

private FT_Glyph_Copy ( IntPtr source, IntPtr &target ) : System.Error
source System.IntPtr
target System.IntPtr
return System.Error
Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
        /// <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));
        }