FT_Outline_Copy() private method

private FT_Outline_Copy ( IntPtr source, IntPtr &target ) : System.Error
source System.IntPtr
target System.IntPtr
return System.Error
Esempio n. 1
0
        /// <summary>
        /// Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of
        /// contours) when this function is called.
        /// </summary>
        /// <param name="target">A handle to the target outline.</param>
        public void Copy(Outline target)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }

            IntPtr targetRef = target.Reference;
            Error  err       = FT.FT_Outline_Copy(Reference, ref targetRef);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of
        /// contours) when this function is called.
        /// </summary>
        /// <param name="target">A handle to the target outline.</param>
        public void Copy(Outline target)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");
            }

            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            IntPtr targetRef = target.Reference;
            Error  err       = FT.FT_Outline_Copy(reference, ref targetRef);

            target.Reference = reference;

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }