Exemplo n.º 1
0
        private void equalizeAllSizesAndFootprintsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IStateFrameData data = stateFrameImage1.Data;
            Vec2i           size = data.getSize(stateFrameImage1.State);
            Vec2i           spot = data.getHotspot(stateFrameImage1.State);

            for (int i = 0; i < 36; ++i)
            {
                data.setSize(i, size);
                data.setHotspot(i, spot);
            }
        }
Exemplo n.º 2
0
        void copyState()
        {
            IStateFrameData data      = stateFrameImage1.Data;
            int             currState = stateFrameImage1.State;

            mCopiedFrames  = new Dictionary <int, string[]>();
            mCopiedOffsets = new Dictionary <int, ArrayList>();
            for (int i = 0; i < stateFrameImage1.Frames; ++i)
            {
                if (data.frameExists(currState, i))
                {
                    mCopiedFrames[i]  = (string[])data.getFrame(currState, i).Clone();
                    mCopiedOffsets[i] = new ArrayList();
                    for (int j = 0; j < stateFrameImage1.FrameParts; ++j)
                    {
                        Vec2i offset = data.getFramePartOffset(currState, i, j);
                        mCopiedOffsets[i].Add(offset);
                    }
                }
            }
            mCopiedSize    = data.getSize(currState);
            mCopiedHotspot = data.getHotspot(currState);
        }