FT_Outline_Render() private method

private FT_Outline_Render ( IntPtr library, IntPtr outline, IntPtr @params ) : System.Error
library System.IntPtr
outline System.IntPtr
@params System.IntPtr
return System.Error
Esempio n. 1
0
        /// <summary>
        /// Render an outline within a bitmap using the current scan-convert. This function uses an
        /// <see cref="RasterParams"/> structure as an argument, allowing advanced features like direct composition,
        /// translucency, etc.
        /// </summary>
        /// <remarks><para>
        /// You should know what you are doing and how <see cref="RasterParams"/> works to use this function.
        /// </para><para>
        /// The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that
        /// the value you give to it is actually ignored.
        /// </para><para>
        /// The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide
        /// your own span callback. See the <see cref="RasterFlags.Direct"/> value of the ‘flags’ field in the
        /// <see cref="RasterParams"/> structure for more details.
        /// </para></remarks>
        /// <param name="parameters">
        /// A pointer to an <see cref="RasterParams"/> structure used to describe the rendering operation.
        /// </param>
        public void Render(RasterParams parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            Error err = FT.FT_Outline_Render(parentLibrary.Reference, Reference, parameters.Reference);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Render an outline within a bitmap using the current scan-convert. This function uses an
        /// <see cref="RasterParams"/> structure as an argument, allowing advanced features like direct composition,
        /// translucency, etc.
        /// </summary>
        /// <remarks><para>
        /// You should know what you are doing and how <see cref="RasterParams"/> works to use this function.
        /// </para><para>
        /// The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that
        /// the value you give to it is actually ignored.
        /// </para><para>
        /// The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide
        /// your own span callback. See the <see cref="RasterFlags.Direct"/> value of the ‘flags’ field in the
        /// <see cref="RasterParams"/> structure for more details.
        /// </para></remarks>
        /// <param name="parameters">
        /// A pointer to an <see cref="RasterParams"/> structure used to describe the rendering operation.
        /// </param>
        public void Render(RasterParams parameters)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");
            }

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

            Error err = FT.FT_Outline_Render(parentLibrary.Reference, reference, parameters.Reference);

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