Beispiel #1
0
        /// <summary>
        /// Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function
        /// also emits ‘move to’ operations to indicate the start of new contours in the outline.
        /// </summary>
        /// <param name="funcInterface">
        /// A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.
        /// </param>
        /// <param name="user">
        /// A typeless pointer which is passed to each emitter during the decomposition. It can be used to store the
        /// state during the decomposition.
        /// </param>
        public void Decompose(OutlineFuncs funcInterface, IntPtr user)
        {
            if (funcInterface == null)
            {
                throw new ArgumentNullException("funcInterface");
            }

            OutlineFuncsRec ofRec = funcInterface.Record;
            Error           err   = FT.FT_Outline_Decompose(Reference, ref ofRec, user);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function
        /// also emits ‘move to’ operations to indicate the start of new contours in the outline.
        /// </summary>
        /// <param name="funcInterface">
        /// A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.
        /// </param>
        /// <param name="user">
        /// A typeless pointer which is passed to each emitter during the decomposition. It can be used to store the
        /// state during the decomposition.
        /// </param>
        public void Decompose(OutlineFuncs funcInterface, IntPtr user)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");
            }

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

            OutlineFuncsRec ofRec = funcInterface.Record;
            Error           err   = FT.FT_Outline_Decompose(reference, ref ofRec, user);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Beispiel #3
0
 internal static extern Error FT_Outline_Decompose(IntPtr outline, ref OutlineFuncsRec func_interface, IntPtr user);