Пример #1
0
        public uiMeshMesh transform(uiMatrix3?matrix)
        {
            var vertices = ObjectPool <uiList <Vector3> > .alloc();

            vertices.SetCapacity(this.vertices.Count);
            vertices.AddRange(this.vertices.data);

            var triangles = ObjectPool <uiList <int> > .alloc();

            triangles.SetCapacity(this.triangles.Count);
            triangles.AddRange(this.triangles.data);


            uiList <Vector2> uv = null;

            if (this.uv != null)
            {
                uv = ObjectPool <uiList <Vector2> > .alloc();

                uv.SetCapacity(this.uv.Count);
                uv.AddRange(this.uv.data);
            }


            var ret = create(matrix, vertices, triangles, uv, this.rawBounds);

            return(ret);
        }
Пример #2
0
        public uiPicture endRecording()
        {
            if (this._states.Count > 1)
            {
                throw new Exception("unmatched save/restore commands");
            }

            uiList <int> stateUpdateIndices = ObjectPool <uiList <int> > .alloc();

            stateUpdateIndices.AddRange(this._stateUpdateIndices);
            var state = this._getState();

            return(uiPicture.create(
                       this._drawCmds,
                       state.paintBounds,
                       bbh: this._bbh,
                       stateUpdateIndices: stateUpdateIndices));
        }