FT_Bitmap_Embolden() private method

private FT_Bitmap_Embolden ( IntPtr library, IntPtr bitmap, IntPtr xStrength, IntPtr yStrength ) : System.Error
library System.IntPtr
bitmap System.IntPtr
xStrength System.IntPtr
yStrength System.IntPtr
return System.Error
Example #1
0
        /// <summary>
        /// Embolden a bitmap. The new bitmap will be about ‘xStrength’ pixels wider and ‘yStrength’ pixels higher. The
        /// left and bottom borders are kept unchanged.
        /// </summary>
        /// <remarks><para>
        /// The current implementation restricts ‘xStrength’ to be less than or equal to 8 if bitmap is of pixel_mode
        /// <see cref="SharpFont.PixelMode.Mono"/>.
        /// </para><para>
        /// If you want to embolden the bitmap owned by a <see cref="GlyphSlot"/>, you should call
        /// <see cref="GlyphSlot.OwnBitmap"/> on the slot first.
        /// </para></remarks>
        /// <param name="library">A handle to a library object.</param>
        /// <param name="xStrength">
        /// How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.
        /// </param>
        /// <param name="yStrength">
        /// How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.
        /// </param>
        public void Embolden(Library library, Fixed26Dot6 xStrength, Fixed26Dot6 yStrength)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            Error err = FT.FT_Bitmap_Embolden(library.Reference, Reference, (IntPtr)xStrength.Value, (IntPtr)yStrength.Value);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Example #2
0
        /// <summary>
        /// Embolden a bitmap. The new bitmap will be about ‘xStrength’ pixels wider and ‘yStrength’ pixels higher. The
        /// left and bottom borders are kept unchanged.
        /// </summary>
        /// <remarks><para>
        /// The current implementation restricts ‘xStrength’ to be less than or equal to 8 if bitmap is of pixel_mode
        /// <see cref="SharpFont.PixelMode.Mono"/>.
        /// </para><para>
        /// If you want to embolden the bitmap owned by a <see cref="GlyphSlot"/>, you should call
        /// <see cref="GlyphSlot.OwnBitmap"/> on the slot first.
        /// </para></remarks>
        /// <param name="library">A handle to a library object.</param>
        /// <param name="xStrength">
        /// How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.
        /// </param>
        /// <param name="yStrength">
        /// How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.
        /// </param>
        public void Embolden(Library library, Fixed26Dot6 xStrength, Fixed26Dot6 yStrength)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("FTBitmap", "Cannot access a disposed object.");
            }

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

            Error err = FT.FT_Bitmap_Embolden(library.Reference, Reference, (IntPtr)xStrength.Value, (IntPtr)yStrength.Value);

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