Пример #1
0
 public FT_Error SetCharSize(
     Fixed26Dot6 char_width,
     Fixed26Dot6 char_height,
     uint horz_resolution,
     uint vert_resolution)
 {
     if (Form == LongForm.Long4)
     {
         return(FT_Set_Char_Size_4(
                    mHandle,
                    char_width.value,
                    char_height.value,
                    horz_resolution,
                    vert_resolution));
     }
     else
     {
         return(FT_Set_Char_Size_8(
                    mHandle,
                    char_width.value8,
                    char_height.value8,
                    horz_resolution,
                    vert_resolution));
     }
 }
Пример #2
0
        /// <summary>
        /// Creates a <see cref="Fixed26Dot6"/> from an int containing a 26.6 value.
        /// </summary>
        /// <param name="form">A <see cref="LongForm"/> form </param>/// ///
        /// <param name="value">A 26.6 value.</param>
        /// <returns>An instance of <see cref="Fixed26Dot6"/>.</returns>
        public static Fixed26Dot6 FromRawValue(this LongForm form, int value)
        {
            Fixed26Dot6 f = new Fixed26Dot6(form, 0);

            if (form == LongForm.Long4)
            {
                f.value = value;
            }
            else
            {
                f.value8 = value;
            }
            return(f);
        }