// Token: 0x06001311 RID: 4881 RVA: 0x0000494B File Offset: 0x00002B4B
 internal void method_43(object object_0, Class61 class61_0)
 {
     if (this.delegate156_0 != null)
     {
         this.delegate156_0(object_0, class61_0);
     }
 }
Exemplo n.º 2
0
 public static Class78 smethod_0(string faceName, int height, bool bold, bool italic)
 {
     return(new Class78(Class61.CreateFontIndirect(new Class49()
     {
         byte_3 = (byte)1, string_0 = faceName, int_0 = height, int_4 = bold ? 700 : 0, byte_0 = Convert.ToByte(italic)
     }), faceName, height));
 }
Exemplo n.º 3
0
        public byte[] method_0()
        {
            if (this.byte_0 == null)
            {
                try
                {
                    switch (Class61.GetFontData(this.class53_0.Handle, Class46.smethod_0("ttcf"), 0U, (byte[])null, 0U))
                    {
                    case 0:
                    case uint.MaxValue:
                        this.byte_0 = this.method_2();
                        break;

                    default:
                        this.byte_0 = this.method_1();
                        break;
                    }
                }
                catch (Exception ex)
                {
                    throw new Exception(string.Format("Failed to load data for font {0}", (object)this.FaceName), ex);
                }
            }
            return(this.byte_0);
        }
Exemplo n.º 4
0
        private void method_0(Class53 dc)
        {
            Class63 lpgs = new Class63();

            if (Class61.GetFontUnicodeRanges(dc.Handle, lpgs) == 0U)
            {
                throw new Exception("Unable to retrieve unicode ranges.");
            }
            this.class76_0 = new Class76[lpgs.uint_3];
            int index1 = 0;
            int num1   = 0;

            for (; (long)index1 < (long)lpgs.uint_3; ++index1)
            {
                byte[] byte0_1 = lpgs.byte_0;
                int    index2  = num1;
                int    num2    = index2 + 1;
                int    num3    = (int)byte0_1[index2];
                byte[] byte0_2 = lpgs.byte_0;
                int    index3  = num2;
                int    num4    = index3 + 1;
                int    num5    = (int)byte0_2[index3] << 8;
                ushort start   = (ushort)(num3 + num5);
                byte[] byte0_3 = lpgs.byte_0;
                int    index4  = num4;
                int    num6    = index4 + 1;
                int    num7    = (int)byte0_3[index4];
                byte[] byte0_4 = lpgs.byte_0;
                int    index5  = num6;
                num1 = index5 + 1;
                int    num8 = (int)byte0_4[index5] << 8;
                ushort num9 = (ushort)(num7 + num8);
                this.class76_0[index1] = new Class76(dc, start, (ushort)((int)start + (int)num9 - 1));
            }
        }
Exemplo n.º 5
0
 protected virtual void vmethod_0(bool disposing)
 {
     if (!disposing || !(this.intptr_0 != IntPtr.Zero))
     {
         return;
     }
     Class61.DeleteObject(this.intptr_0);
     this.intptr_0 = IntPtr.Zero;
 }
Exemplo n.º 6
0
 public ushort method_0(char c)
 {
     if (this.ushort_2 == null)
     {
         string lpstr = this.method_1();
         this.ushort_2 = new ushort[lpstr.Length];
         int glyphIndices = (int)Class61.GetGlyphIndices(this.class53_0.Handle, lpstr, lpstr.Length, this.ushort_2, 0U);
     }
     return(this.ushort_2[(int)(ushort)((uint)c - (uint)this.ushort_0)]);
 }
Exemplo n.º 7
0
        private byte[] method_2(string tableName)
        {
            uint dwTable = Class46.smethod_0(tableName);

            byte[] lpvBuffer = new byte[Class61.GetFontData(this.class53_0.Handle, dwTable, 0U, (byte[])null, 0U)];
            if (Class61.GetFontData(this.class53_0.Handle, dwTable, 0U, lpvBuffer, (uint)lpvBuffer.Length) == uint.MaxValue)
            {
                throw new Exception("Failed to retrieve table " + tableName);
            }
            return(lpvBuffer);
        }
Exemplo n.º 8
0
        private byte[] method_2()
        {
            uint fontData = Class61.GetFontData(this.class53_0.Handle, 0U, 0U, (byte[])null, 0U);

            if (fontData == uint.MaxValue)
            {
                throw new InvalidOperationException("No font selected into device context");
            }
            byte[] lpvBuffer = new byte[fontData];
            if (Class61.GetFontData(this.class53_0.Handle, 0U, 0U, lpvBuffer, fontData) == uint.MaxValue)
            {
                throw new Exception("Failed to retrieve table data for font " + this.FaceName);
            }
            return(lpvBuffer);
        }
Exemplo n.º 9
0
 bool IEnumerator.MoveNext()
 {
     if (this.int_1 >= this.string_0.Length)
     {
         return(false);
     }
     if (Class61.smethod_3(this.string_0, this.int_1))
     {
         this.int_0  = Class61.smethod_2(this.string_0, this.int_1);
         this.int_1 += 2;
         return(true);
     }
     this.int_0 = this.string_0[this.int_1];
     this.int_1++;
     return(true);
 }
Exemplo n.º 10
0
        internal Class42(ns4.Class53 dc, ns1.Class78 currentFont)
        {
            if (dc.Handle == IntPtr.Zero)
            {
                throw new ArgumentNullException(nameof(dc), "Handle to device context cannot be null");
            }
            if (dc.method_1(ns1.Enum0.const_3) == IntPtr.Zero)
            {
                throw new ArgumentException("No font selected into supplied device context", nameof(dc));
            }
            this.class53_0 = dc;
            this.class78_0 = currentFont;
            StringBuilder lpFaceName = new StringBuilder((int)byte.MaxValue);

            Class61.GetTextFace(dc.Handle, lpFaceName.Capacity, lpFaceName);
            this.string_0  = lpFaceName.ToString();
            this.class52_0 = new Class52(dc);
            this.class80_0 = new Class80(new MemoryStream(this.method_0()), this.string_0);
            this.class66_0 = new ns10.Class66(this.EmSquare);
            currentFont.Dispose();
        }
Exemplo n.º 11
0
 public FontStyles method_0(string familyName)
 {
     this.fontStyles_0.method_0();
     Class61.EnumFontFamilies(this.class53_0.Handle, familyName, new Delegate0(this.method_2), 2);
     return(this.fontStyles_0);
 }
Exemplo n.º 12
0
    // Token: 0x06000214 RID: 532 RVA: 0x00012D50 File Offset: 0x00010F50
    public static byte[] smethod_0(string string_0)
    {
        if (string_0 == null)
        {
            throw new Exception();
        }
        MemoryStream memoryStream = new MemoryStream(string_0.Length * 4 / 5);

        byte[] result;
        try
        {
            int  num  = 0;
            uint num2 = 0u;
            foreach (char c in string_0)
            {
                if (c == 'z' && num == 0)
                {
                    Class61.smethod_1(memoryStream, num2, 0);
                }
                else
                {
                    if (c < '!' || c > 'u')
                    {
                        throw new Exception();
                    }
                    checked
                    {
                        num2 += (uint)(unchecked ((ulong)Class61.uint_0[num]) * (ulong)(unchecked ((long)(checked (c - '!')))));
                    }
                    num++;
                    if (num == 5)
                    {
                        Class61.smethod_1(memoryStream, num2, 0);
                        num  = 0;
                        num2 = 0u;
                    }
                }
            }
            if (num == 1)
            {
                throw new Exception();
            }
            if (num > 1)
            {
                for (int j = num; j < 5; j++)
                {
                    checked
                    {
                        num2 += 84u * Class61.uint_0[j];
                    }
                }
                Class61.smethod_1(memoryStream, num2, 5 - num);
            }
            result = memoryStream.ToArray();
        }
        finally
        {
            ((IDisposable)memoryStream).Dispose();
        }
        return(result);
    }
Exemplo n.º 13
0
        // Token: 0x0600145F RID: 5215 RVA: 0x000251D8 File Offset: 0x000233D8
        public void Buffering(bool Start)
        {
            Class61 class61_ = new Class61(Start);

            this.class24_0.method_43(this.class24_0, class61_);
        }
Exemplo n.º 14
0
 public IntPtr method_1(Enum0 objectType)
 {
     return(Class61.GetCurrentObject(this.intptr_0, objectType));
 }
Exemplo n.º 15
0
 public IntPtr method_0(Class78 font)
 {
     return(Class61.SelectObject(this.intptr_0, font.Handle));
 }
Exemplo n.º 16
0
 public Class53()
 {
     this.intptr_0 = Class61.GetDC(IntPtr.Zero);
 }