FT_Glyph_Copy() 개인적인 메소드

private FT_Glyph_Copy ( IntPtr source, IntPtr &target ) : System.Error
source System.IntPtr
target System.IntPtr
리턴 System.Error
예제 #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));
        }
예제 #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));
        }