Ejemplo n.º 1
0
        void ToolDown(JToken inputMessage)
        {
            float  pressure = inputMessage.Value <float>("pressure");
            int    x        = inputMessage.Value <int>("x");
            int    y        = inputMessage.Value <int>("y");
            Tool   tool     = m_tools[inputMessage.Value <string>("tool")]; //swap tool on tool down
            string layerID  = inputMessage.Value <string>("layer");

            m_currentLayer = m_picture.GetLayer(layerID);
            m_currentTool  = tool;
            m_currentTool.Down(x, y, pressure, m_picture, m_currentLayer, inputMessage["options"]);
            m_currentLayer.History.BeginNewUndoLevel();
            m_currentLayer.History.StoreUndoData(inputMessage);
        }