Esempio n. 1
0
        public virtual global::haxe.ds.List map(global::haxe.lang.Function f)
        {
                        #line 234 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            global::haxe.ds.List           b = new global::haxe.ds.List();
            global::haxe.ds._List.ListNode l = this.h;
                        #line 236 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            while ((l != null))
            {
                                #line 237 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
                object v = l.item;
                l = l.next;
                                #line 239 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
                b.@add(((object)(f.__hx_invoke1_o(default(double), v))));
            }

                        #line 241 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            return(b);
        }
Esempio n. 2
0
    public static global::haxe.ds.List <A> list <A>(object it)
    {
                #line 58 "/opt/haxe/std/Lambda.hx"
        global::haxe.ds.List <A> l = new global::haxe.ds.List <A>();
        {
                        #line 59 "/opt/haxe/std/Lambda.hx"
            object i = ((object)(global::haxe.lang.Runtime.callField(it, "iterator", 328878574, null)));
                        #line 59 "/opt/haxe/std/Lambda.hx"
            while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(i, "hasNext", 407283053, null)))
            {
                                #line 59 "/opt/haxe/std/Lambda.hx"
                A i1 = global::haxe.lang.Runtime.genericCast <A>(global::haxe.lang.Runtime.callField(i, "next", 1224901875, null));
                l.@add(i1);
            }
        }

                #line 61 "/opt/haxe/std/Lambda.hx"
        return(l);
    }
Esempio n. 3
0
        public virtual object haxe_ds_List_cast <T_c>()
        {
            if (global::haxe.lang.Runtime.eq(typeof(T), typeof(T_c)))
            {
                return(this);
            }

            global::haxe.ds.List <T_c>       new_me = new global::haxe.ds.List <T_c>(global::haxe.lang.EmptyObject.EMPTY);
            global::haxe.root.Array <object> fields = global::haxe.root.Reflect.fields(this);
            int i = 0;

            while ((i < fields.length))
            {
                string field = global::haxe.lang.Runtime.toString(fields[i++]);
                global::haxe.root.Reflect.setField(new_me, field, global::haxe.root.Reflect.field(this, field));
            }

            return(new_me);
        }
Esempio n. 4
0
        public static global::haxe.ds.List <object> build32BGRA(int width, int height, global::haxe.io.Bytes data, global::haxe.lang.Null <int> level)
        {
            unchecked {
                global::haxe.lang.Null <int> level1 = ((!(level.hasValue)) ? (new global::haxe.lang.Null <int>(9, true)) : (level));
                global::haxe.io.Bytes        rgba   = global::haxe.io.Bytes.alloc((((width * height) * 4) + height));
                int w = 0;
                int r = 0;
                {
                    int _g1 = 0;
                    int _g  = height;
                    while ((_g1 < _g))
                    {
                        int y = _g1++;
                        rgba.b[w++] = ((byte)(0));
                        {
                            int _g3 = 0;
                            int _g2 = width;
                            while ((_g3 < _g2))
                            {
                                int x = _g3++;
                                rgba.b[w++] = ((byte)(((int)(data.b[(r + 2)]))));
                                rgba.b[w++] = ((byte)(((int)(data.b[(r + 1)]))));
                                rgba.b[w++] = ((byte)(((int)(data.b[r]))));
                                rgba.b[w++] = ((byte)(((int)(data.b[(r + 3)]))));
                                r          += 4;
                            }
                        }
                    }
                }

                global::haxe.ds.List <object> l = new global::haxe.ds.List <object>();
                object __temp_stmt2             = null;
                {
                    global::format.png.Color __temp_odecl1 = global::format.png.Color.ColTrue(true);
                    __temp_stmt2 = new global::haxe.lang.DynamicObject(new int[] { 1247572323, 1501088657 }, new object[] { __temp_odecl1, false }, new int[] { 38537191, 1247983110, 1724357446 }, new double[] { ((double)(height)), ((double)(width)), ((double)(8)) });
                }

                l.@add(global::format.png.Chunk.CHeader(__temp_stmt2));
                l.@add(global::format.png.Chunk.CData(global::format.tools.Deflate.run(rgba, level1)));
                l.@add(global::format.png.Chunk.CEnd);
                return(l);
            }
        }
Esempio n. 5
0
        public static global::haxe.ds.List list(object it)
        {
                        #line 58 "C:\\HaxeToolkit\\haxe\\std\\Lambda.hx"
            global::haxe.ds.List l = new global::haxe.ds.List();
            {
                                #line 59 "C:\\HaxeToolkit\\haxe\\std\\Lambda.hx"
                object i = ((object)(global::haxe.lang.Runtime.callField(it, "iterator", 328878574, null)));
                                #line 59 "C:\\HaxeToolkit\\haxe\\std\\Lambda.hx"
                while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(i, "hasNext", 407283053, null)))
                {
                                        #line 59 "C:\\HaxeToolkit\\haxe\\std\\Lambda.hx"
                    object i1 = ((object)(global::haxe.lang.Runtime.callField(i, "next", 1224901875, null)));
                    l.@add(i1);
                }
            }

                        #line 61 "C:\\HaxeToolkit\\haxe\\std\\Lambda.hx"
            return(l);
        }
Esempio n. 6
0
        public virtual global::haxe.ds.List filter(global::haxe.lang.Function f)
        {
                        #line 218 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            global::haxe.ds.List           l2 = new global::haxe.ds.List();
            global::haxe.ds._List.ListNode l  = this.h;
                        #line 220 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            while ((l != null))
            {
                                #line 221 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
                object v = l.item;
                l = l.next;
                                #line 223 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
                if (global::haxe.lang.Runtime.toBool(f.__hx_invoke1_o(default(double), v)))
                {
                                        #line 224 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
                    l2.@add(v);
                }
            }

                        #line 226 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
            return(l2);
        }
Esempio n. 7
0
        public virtual object read()
        {
            unchecked {
                {
                    int _g = 0;
                    global::haxe.root.Array <int> _g1 = new global::haxe.root.Array <int>(new int[] { 71, 73, 70 });
                    while ((_g < _g1.length))
                    {
                        int b = _g1[_g];
                        ++_g;
                        if ((this.i.readByte() != b))
                        {
                            throw global::haxe.lang.HaxeException.wrap("Invalid header");
                        }
                    }
                }

                string gifVer = this.i.readString(3);
                global::format.gif.Version version = global::format.gif.Version.GIF89a;
                switch (gifVer)
                {
                case "87a":
                {
                    version = global::format.gif.Version.GIF87a;
                    break;
                }


                case "89a":
                {
                    version = global::format.gif.Version.GIF89a;
                    break;
                }


                default:
                {
                    version = global::format.gif.Version.Unknown(gifVer);
                    break;
                }
                }

                int    width            = this.i.readUInt16();
                int    height           = this.i.readUInt16();
                int    packedField      = this.i.readByte();
                int    bgIndex          = this.i.readByte();
                double pixelAspectRatio = ((double)(this.i.readByte()));
                if ((pixelAspectRatio != 0))
                {
                    pixelAspectRatio = (((pixelAspectRatio + 15)) / 64);
                }
                else
                {
                    pixelAspectRatio = ((double)(1));
                }

                object lsd = new global::haxe.lang.DynamicObject(new int[] { 808948541, 2070785640 }, new object[] { (((packedField & 8)) == 8), (((packedField & 128)) == 128) }, new int[] { 38537191, 234855119, 623891245, 736935997, 1018258543, 1247983110 }, new double[] { ((double)(height)), ((double)((2 << ((packedField & 7))))), pixelAspectRatio, ((double)(bgIndex)), ((double)(((int)((((uint)(((packedField & 112)))) >> 4))))), ((double)(width)) });
                global::haxe.io.Bytes gct = null;
                if (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.getField(lsd, "hasGlobalColorTable", 2070785640, true)))
                {
                    gct = this.readColorTable(((int)(global::haxe.lang.Runtime.getField_f(lsd, "globalColorTableSize", 234855119, true))));
                }

                global::haxe.ds.List <object> blocks = new global::haxe.ds.List <object>();
                while (true)
                {
                    global::format.gif.Block b1 = this.readBlock();
                    blocks.@add(b1);
                    if ((b1 == global::format.gif.Block.BEOF))
                    {
                        break;
                    }
                }

                return(new global::haxe.lang.DynamicObject(new int[] { 146652910, 669658758, 2032764644, 2096228120 }, new object[] { gct, blocks, lsd, version }, new int[] {}, new double[] {}));
            }
        }
Esempio n. 8
0
 public static object __hx_cast <T_c_c>(global::haxe.ds.List me)
 {
     return(((me != null)) ? (me.haxe_ds_List_cast <T_c_c>()) : default(object));
 }
Esempio n. 9
0
 protected static void __hx_ctor_haxe_ds_List <T_c>(global::haxe.ds.List <T_c> __hx_this)
 {
     __hx_this.length = 0;
 }
Esempio n. 10
0
 protected static void __hx_ctor_haxe_ds_List(global::haxe.ds.List __hx_this)
 {
                 #line 45 "C:\\HaxeToolkit\\haxe\\std\\haxe\\ds\\List.hx"
     __hx_this.length = 0;
 }
Esempio n. 11
0
        public virtual void write(global::haxe.ds.List <object> png)
        {
            unchecked {
                {
                    int _g = 0;
                    global::haxe.root.Array <int> _g1 = new global::haxe.root.Array <int>(new int[] { 137, 80, 78, 71, 13, 10, 26, 10 });
                    while ((_g < _g1.length))
                    {
                        int b = _g1[_g];
                        ++_g;
                        this.o.writeByte(b);
                    }
                }

                {
                    global::haxe.ds._List.ListNode <object> _g_head = png.h;
                    while ((_g_head != null))
                    {
                        global::format.png.Chunk val = ((global::format.png.Chunk)(_g_head.item));
                        _g_head = _g_head.next;
                        global::format.png.Chunk c = ((global::format.png.Chunk)(val));
                        switch (c._hx_index)
                        {
                        case 0:
                        {
                            this.writeChunk("IEND", global::haxe.io.Bytes.alloc(0));
                            break;
                        }


                        case 1:
                        {
                            object h = (c as global::format.png.Chunk_CHeader).h;
                            {
                                global::haxe.io.BytesOutput b1 = new global::haxe.io.BytesOutput();
                                b1.set_bigEndian(true);
                                b1.writeInt32(((int)(global::haxe.lang.Runtime.getField_f(h, "width", 1247983110, true))));
                                b1.writeInt32(((int)(global::haxe.lang.Runtime.getField_f(h, "height", 38537191, true))));
                                b1.writeByte(((int)(global::haxe.lang.Runtime.getField_f(h, "colbits", 1724357446, true))));
                                global::format.png.Color _g2 = ((global::format.png.Color)(global::haxe.lang.Runtime.getField(h, "color", 1247572323, true)));
                                int tmp = default(int);
                                switch (_g2._hx_index)
                                {
                                case 0:
                                {
                                    bool alpha = (_g2 as global::format.png.Color_ColGrey).alpha;
                                    tmp = ((alpha) ? (4) : (0));
                                    break;
                                }


                                case 1:
                                {
                                    bool alpha1 = (_g2 as global::format.png.Color_ColTrue).alpha;
                                    tmp = ((alpha1) ? (6) : (2));
                                    break;
                                }


                                case 2:
                                {
                                    tmp = 3;
                                    break;
                                }
                                }

                                b1.writeByte(tmp);
                                b1.writeByte(0);
                                b1.writeByte(0);
                                b1.writeByte(((global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.getField(h, "interlaced", 1501088657, true))) ? (1) : (0)));
                                this.writeChunk("IHDR", b1.getBytes());
                            }

                            break;
                        }


                        case 2:
                        {
                            global::haxe.io.Bytes d = (c as global::format.png.Chunk_CData).b;
                            this.writeChunk("IDAT", d);
                            break;
                        }


                        case 3:
                        {
                            global::haxe.io.Bytes b2 = (c as global::format.png.Chunk_CPalette).b;
                            this.writeChunk("PLTE", b2);
                            break;
                        }


                        case 4:
                        {
                            global::haxe.io.Bytes data = (c as global::format.png.Chunk_CUnknown).data;
                            string id = (c as global::format.png.Chunk_CUnknown).id;
                            this.writeChunk(id, data);
                            break;
                        }
                        }
                    }
                }
            }
        }