FT_Outline_Embolden() private method

private FT_Outline_Embolden ( IntPtr outline, IntPtr strength ) : System.Error
outline System.IntPtr
strength System.IntPtr
return System.Error
Esempio n. 1
0
        /// <summary><para>
        /// Embolden an outline. The new outline will be at most 4 times ‘strength’ pixels wider and higher. You may
        /// think of the left and bottom borders as unchanged.
        /// </para><para>
        /// Negative ‘strength’ values to reduce the outline thickness are possible also.
        /// </para></summary>
        /// <remarks><para>
        /// The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points;
        /// this means that certain situations like acute angles or intersections are sometimes handled incorrectly.
        /// </para><para>
        /// If you need ‘better’ metrics values you should call <see cref="GetCBox"/> or <see cref="GetBBox"/>.
        /// </para></remarks>
        /// <example>
        /// FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
        /// if ( face-&gt;slot-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
        ///     FT_Outline_Embolden( &amp;face-&gt;slot-&gt;outline, strength );
        /// </example>
        /// <param name="strength">How strong the glyph is emboldened. Expressed in 26.6 pixel format.</param>
        public void Embolden(Fixed26Dot6 strength)
        {
            Error err = FT.FT_Outline_Embolden(Reference, (IntPtr)strength.Value);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Esempio n. 2
0
        /// <summary><para>
        /// Embolden an outline. The new outline will be at most 4 times ‘strength’ pixels wider and higher. You may
        /// think of the left and bottom borders as unchanged.
        /// </para><para>
        /// Negative ‘strength’ values to reduce the outline thickness are possible also.
        /// </para></summary>
        /// <remarks><para>
        /// The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points;
        /// this means that certain situations like acute angles or intersections are sometimes handled incorrectly.
        /// </para><para>
        /// If you need ‘better’ metrics values you should call <see cref="GetCBox"/> or <see cref="GetBBox"/>.
        /// </para></remarks>
        /// <example>
        /// FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
        /// if ( face-&gt;slot-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
        ///     FT_Outline_Embolden( &amp;face-&gt;slot-&gt;outline, strength );
        /// </example>
        /// <param name="strength">How strong the glyph is emboldened. Expressed in 26.6 pixel format.</param>
        public void Embolden(Fixed26Dot6 strength)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");
            }

            Error err = FT.FT_Outline_Embolden(reference, (IntPtr)strength.Value);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Esempio n. 3
0
        /// <summary><para>
        /// Embolden an outline. The new outline will be at most 4 times ‘strength’ pixels wider and higher. You may
        /// think of the left and bottom borders as unchanged.
        /// </para><para>
        /// Negative ‘strength’ values to reduce the outline thickness are possible also.
        /// </para></summary>
        /// <remarks><para>
        /// The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points;
        /// this means that certain situations like acute angles or intersections are sometimes handled incorrectly.
        /// </para><para>
        /// If you need ‘better’ metrics values you should call <see cref="GetCBox"/> or <see cref="GetBBox"/>.
        /// </para></remarks>
        /// <example>
        /// FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
        /// if ( face-&gt;slot-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
        ///     FT_Outline_Embolden( &amp;face-&gt;slot-&gt;outline, strength );
        /// </example>
        /// <param name="strength">How strong the glyph is emboldened. Expressed in 26.6 pixel format.</param>
        public void Embolden(int strength)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");
            }

            Error err = FT.FT_Outline_Embolden(reference, strength);

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