Beispiel #1
0
    internal void method_2()
    {
        int num = 0;

        if (((this.class891_1 != null) && (this.class891_1.Length != 0)) && ((this.class679_0 != null) && (this.class679_0.Length != 0)))
        {
            StringBuilder builder = new StringBuilder();
            int           index   = 0;
            for (int i = 0; i < this.class679_0.Length; i++)
            {
                Class679 class3 = this.class679_0[i];
                builder.Append(Class1085.smethod_74(class3.method_0()));
                int num3 = class3.method_2();
                for (int j = 0; j < num3; j++)
                {
                    if (index >= this.class891_1.Length)
                    {
                        throw new InvalidOperationException(BookmarkStart.b("栥䜧帩ఫ䬭帯崱䄳儵倷ᨹ䰻弽㈿⍁⥃⍅㱇⽉㹋㵍灏㭑㩓癕㽗㽙㍛㍝՟ᙡᙣὥ䡧ᩩ൫ᩭᡯ山", num));
                    }
                    Class891 class2 = this.class891_1[index];
                    builder.Append(this.method_3(class2.method_0()));
                    builder.Append(',');
                    builder.Append(this.method_3(class2.method_1()));
                    builder.Append(',');
                    index++;
                }
                if (num3 > 0)
                {
                    builder.Remove(builder.Length - 1, 1);
                }
            }
            this.class398_0.method_40(BookmarkStart.b("嘥䤧帩䐫", num), builder.ToString());
        }
    }
Beispiel #2
0
 internal static int smethod_4(Class679 A_0)
 {
     if (A_0.method_0() >= PathType.EscapeBase)
     {
         return(A_0.method_1() | (((int)A_0.method_0()) << 8));
     }
     return(A_0.method_1() | (((int)A_0.method_0()) << 13));
 }
Beispiel #3
0
    private static int smethod_0(Class679 A_0, int A_1)
    {
        if (A_0.method_0() == PathType.Close)
        {
            return(1);
        }
        int num = A_0.method_4();

        if (num <= 0)
        {
            return(0);
        }
        return(A_1 / num);
    }
Beispiel #4
0
    private void method_2()
    {
        if (this.arrayList_0.Count > 0)
        {
            Class679 class2 = (Class679)this.arrayList_0[this.arrayList_0.Count - 1];
            this.arrayList_0[this.arrayList_0.Count - 1] = new Class679(class2.method_0(), smethod_0(class2, this.int_0 / 2));
        }
        string str = this.stringBuilder_0.ToString().ToLower();

        this.stringBuilder_0.Length = 0;
        Class679 class3 = new Class679(smethod_2(str), 0);

        this.arrayList_0.Add(class3);
        this.bool_0 = smethod_3(str);
        this.int_0  = 0;
    }
Beispiel #5
0
 internal Class679[] method_10()
 {
     if (this.int_3 == 0)
     {
         return(null);
     }
     using (MemoryStream stream = new MemoryStream(this.byte_0))
     {
         BinaryReader reader     = new BinaryReader(stream);
         Class679[]   classArray = new Class679[this.int_3];
         for (int i = 0; i < classArray.Length; i++)
         {
             int num2 = reader.ReadUInt16();
             classArray[i] = Class781.smethod_3(num2);
         }
         return(classArray);
     }
 }
Beispiel #6
0
    private void method_13(ShapeObject A_0)
    {
        int num = 9;

        Class679[] segmentInfo = A_0.SegmentInfo;
        Class891[] vertices    = A_0.Vertices;
        if (vertices != null)
        {
            string str3 = "";
            string str  = "";
            int    num2 = 0;
            for (int i = 0; i < segmentInfo.Length; i++)
            {
                Class679 class2 = segmentInfo[i];
                if (class2.method_0() != PathType.Unknown)
                {
                    string str2 = Class922.smethod_6(class2.method_0());
                    if (Class567.smethod_16(str2))
                    {
                        int num4 = class2.method_2();
                        if ((str != str2) && ((!(str2 == BookmarkStart.b("眮", num)) && !(str2 == BookmarkStart.b("瘮", num))) || (!(str == BookmarkStart.b("眮", num)) && !(str == BookmarkStart.b("瘮", num)))))
                        {
                            str3 = string.Format(BookmarkStart.b("吮İ串ᔴ䰶࠸䘺", num), str3, str2);
                        }
                        for (int j = num2; j < (num2 + num4); j++)
                        {
                            Class891 class3 = vertices[j];
                            bool     flag   = ((class2.method_0() == PathType.AngleEllipse) || (class2.method_0() == PathType.AngleEllipseTo)) ? ((((j - num2) + 1) % 3) == 0) : false;
                            str3 = string.Format(BookmarkStart.b("吮İ串ᔴ䰶࠸䘺ᴼ䐾獀㹂", num), str3, this.method_14(class3.method_0(), flag), this.method_14(class3.method_1(), flag));
                        }
                        num2 += num4;
                        str   = str2;
                    }
                }
            }
            this.class400_0.method_40(BookmarkStart.b("䬮䌰刲䈴ശ尸唺唼帾⽀⁂⁄⍆摈㭊ⱌ㭎㥐", num), str3.Trim());
        }
    }
Beispiel #7
0
    internal static void smethod_0(Class43 A_0)
    {
        EscherShapePath linesClosed = EscherShapePath.LinesClosed;
        object          obj2        = A_0.method_31(0x144);

        if (obj2 != null)
        {
            linesClosed = (EscherShapePath)obj2;
            A_0.Remove(0x144);
        }
        Class891[] classArray = (Class891[])A_0.method_31(0x145);
        if ((classArray == null) || (classArray.Length == 0))
        {
            return;
        }
        Class679[] classArray2 = (Class679[])A_0.method_31(0x146);
        if ((classArray2 != null) && (classArray2.Length > 0))
        {
            return;
        }
        ShapeType type = (ShapeType)A_0.method_31(0x103b);

        if (type == ShapeType.Arc)
        {
            classArray2 = smethod_1();
        }
        else
        {
            switch (linesClosed)
            {
            case EscherShapePath.Lines:
                classArray2 = smethod_2(classArray);
                goto Label_0151;

            case EscherShapePath.LinesClosed:
                classArray2 = new Class679[] { new Class679(PathType.MoveTo, 0), new Class679(PathType.LineTo, classArray.Length - 1), new Class679(PathType.Close, 1), new Class679(PathType.End, 0) };
                goto Label_0151;

            case EscherShapePath.Curves:
            {
                classArray2    = new Class679[3];
                classArray2[0] = new Class679(PathType.MoveTo, 0);
                int num = (classArray.Length - 1) / 3;
                classArray2[1] = new Class679(PathType.CurveTo, num);
                classArray2[2] = new Class679(PathType.End, 0);
                goto Label_0151;
            }

            case EscherShapePath.CurvesClosed:
            {
                classArray2    = new Class679[4];
                classArray2[0] = new Class679(PathType.MoveTo, 0);
                int num2 = (classArray.Length - 1) / 3;
                classArray2[1] = new Class679(PathType.CurveTo, num2);
                classArray2[2] = new Class679(PathType.Close, 1);
                classArray2[3] = new Class679(PathType.End, 0);
                goto Label_0151;
            }
            }
            classArray2 = smethod_2(classArray);
        }
Label_0151:
        A_0.SetAttr(0x146, classArray2);
    }
    private void method_5()
    {
        ArrayList list    = new ArrayList();
        ArrayList list2   = new ArrayList();
        PathType  unknown = PathType.Unknown;
        int       num     = 0;
        Class679  class2  = new Class679();
        Class891  class3  = new Class891();
        char      ch      = 'M';
        Class891  class4  = new Class891();
        Class891  class5  = new Class891();

        while (num < this.arrayList_0.Count)
        {
            if (smethod_3(this.arrayList_0[num]))
            {
                ch      = (char)this.arrayList_0[num];
                unknown = Class922.smethod_5(ch);
                if (unknown != PathType.ArcTo)
                {
                    class2 = new Class679(unknown, 1);
                    if (class2.method_2() == 0)
                    {
                        list2.Add(class2);
                    }
                }
                num++;
            }
            else
            {
                switch (unknown)
                {
                case PathType.Unknown:
                case PathType.ArcTo:
                    goto Label_0242;
                }
                list2.Add(class2);
                int num5 = class2.method_2();
                for (int k = 0; k < num5; k++)
                {
                    Class891 class6 = new Class891();
                    char     ch2    = char.ToUpper(ch);
                    if ((ch2 == 'S') && (k == 0))
                    {
                        class6 = smethod_1(class3, class4);
                    }
                    else if ((ch2 == 'T') && (k == 0))
                    {
                        class6 = smethod_1(class3, class5);
                    }
                    else
                    {
                        if (ch2 == 'V')
                        {
                            class6 = new Class891(class3.method_0(), class6.method_1());
                        }
                        else
                        {
                            class6 = new Class891(smethod_0((string)this.arrayList_0[num++]), class6.method_1());
                            if (char.IsLower(ch))
                            {
                                class6 = new Class891(class6.method_0().method_1() + class3.method_0().method_1(), class6.method_1().method_1());
                            }
                        }
                        if (ch2 == 'H')
                        {
                            class6 = new Class891(class6.method_0(), class3.method_1());
                        }
                        else
                        {
                            class6 = new Class891(class6.method_0(), smethod_0((string)this.arrayList_0[num++]));
                            if (char.IsLower(ch))
                            {
                                class6 = new Class891(class6.method_0().method_1(), class6.method_1().method_1() + class3.method_1().method_1());
                            }
                        }
                    }
                    if (k == (num5 - 1))
                    {
                        class3 = class6;
                    }
                    if (unknown == PathType.CurveTo)
                    {
                        if (k == 1)
                        {
                            class4 = class6;
                        }
                    }
                    else
                    {
                        class4 = class3;
                    }
                    if (unknown == PathType.QuadraticBezier)
                    {
                        if (k == 0)
                        {
                            class5 = class6;
                        }
                    }
                    else
                    {
                        class5 = class3;
                    }
                    list.Add(class6);
                }
            }
            continue;
Label_0242:
            num++;
        }
        if (class2.method_0() != PathType.Close)
        {
            list2.Insert(0, new Class679(PathType.NoFill, 1));
        }
        Class891[] classArray2 = new Class891[list.Count];
        for (int i = 0; i < list.Count; i++)
        {
            classArray2[i] = (Class891)list[i];
        }
        Class679[] classArray = new Class679[list2.Count];
        for (int j = 0; j < list2.Count; j++)
        {
            classArray[j] = (Class679)list2[j];
        }
        this.class43_0.SetAttr(0x145, classArray2);
        this.class43_0.SetAttr(0x146, classArray);
    }
Beispiel #9
0
 public DxfAttributeDefinition GetAttributeDefinition(string tag)
 {
     return(Class679.GetAttributeDefinition(tag, (IEnumerable <DxfEntity>) this.Entities));
 }