示例#1
0
        internal void GuiInput_MouseDown(object sender, MouseEventArgs e)
        {
            string toolName = m_mainForm.GetToolName();
            EzJson j        = new EzJson();

            j.BeginFunction("tool_down");
            j.AddData("pressure", (128).ToString());
            j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
            j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
            j.AddData("layer", selectedLayerID);
            j.AddData("tool", toolName);
            switch (toolName)
            {
            case "brush":
                j.AddData("options", m_mainForm.GetBrushOptions());
                break;

            case "pen":
                j.AddData("options", m_mainForm.GetPenOptions());
                break;

            default:
                j.AddData("options", null);
                break;
            }
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#2
0
        internal void GuiInput_PointerDown(object sender, int x, int y, float pressure = 1.0f)
        {
            string toolName = m_mainForm.GetToolName();
            EzJson j        = new EzJson();

            j.BeginFunction("tool_down");
            j.AddField("pressure", pressure.ToString(CultureInfo.InvariantCulture.NumberFormat));
            j.AddField("x", (int)(x / m_canvasWindow.magnification));
            j.AddField("y", (int)(y / m_canvasWindow.magnification));
            j.AddField("layer", selectedLayerID);
            j.AddField("tool", toolName);
            switch (toolName)
            {
            case "brush":
                j.AddObject("options", m_mainForm.GetBrushOptions());
                break;

            case "pen":
                j.AddObject("options", m_mainForm.GetPenOptions());
                break;

            default:
                j.AddField("options", "");
                break;
            }
            m_controller.GuiInput(j.Finish());
        }
示例#3
0
        internal void GuiInput_TabletDown(object sender, WintabPacket pkt)
        {
            string toolName = m_mainForm.GetToolName();
            EzJson j        = new EzJson();

            j.BeginFunction("tool_down");
            j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
            j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
            j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
            j.AddData("layer", selectedLayerID);
            j.AddData("tool", toolName);
            switch (toolName)
            {
            case "brush":
                j.AddData("options", m_mainForm.GetBrushOptions());
                break;

            case "pen":
                j.AddData("options", m_mainForm.GetPenOptions());
                break;

            default:
                j.AddData("options", null);
                break;
            }
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#4
0
        internal void Gui_RemoveLayer(string pLayerID)
        {
            EzJson j = new EzJson();

            j.BeginFunction("remove_layer");
            j.AddData("layer", pLayerID);
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#5
0
        internal void Gui_SetLayerOrder(string[] pOrderedIDs)
        {
            EzJson j = new EzJson();

            j.BeginFunction("reorder_layers");
            j.AddObject("order", pOrderedIDs);
            m_controller.GuiInput(j.Finish());
        }
示例#6
0
        internal void Gui_RemoveLayer(string pLayerID)
        {
            EzJson j = new EzJson();

            j.BeginFunction("remove_layer");
            j.AddField("layer", pLayerID);
            m_controller.GuiInput(j.Finish());
        }
示例#7
0
        internal void Gui_SetLayerOrder(string[] pOrderedIDs)
        {
            EzJson j = new EzJson();

            j.BeginFunction("reorder_layers");
            j.AddData("order", pOrderedIDs);
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#8
0
        internal void Gui_RenameLayer(string pLayerID, string pNewName)
        {
            EzJson j = new EzJson();

            j.BeginFunction("rename_layer");
            j.AddData("layer", pLayerID);
            j.AddData("name", pNewName);
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#9
0
        internal void Gui_Undo()
        {
            EzJson j = new EzJson();

            j.BeginFunction("undo");
            j.AddData("layer", selectedLayerID);
            m_toolRunner.ParseJSON(j.Finish());
            Console.WriteLine("undo!");
        }
示例#10
0
        internal void Gui_RenameLayer(string pLayerID, string pNewName)
        {
            EzJson j = new EzJson();

            j.BeginFunction("rename_layer");
            j.AddField("layer", pLayerID);
            j.AddField("name", pNewName);
            m_controller.GuiInput(j.Finish());
        }
示例#11
0
        //internal void GuiInput_TabletMove(object sender, WintabPacket pkt)
        //{
        //    EzJson j = new EzJson();
        //    j.BeginFunction("tool_move");
        //    j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
        //    j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
        //    j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
        //    m_toolRunner.ParseJSON(j.Finish());
        //}

        internal void Gui_Undo()
        {
            EzJson j = new EzJson();

            j.BeginFunction("undo");
            j.AddField("layer", selectedLayerID);
            m_controller.GuiInput(j.Finish());
            Console.WriteLine("undo!");
        }
示例#12
0
        internal string Gui_CreateLayer()
        {
            string id = Guid.NewGuid().ToString(); //create a globally unique id
            EzJson j  = new EzJson();

            j.BeginFunction("create_layer");
            j.AddData("layer", id);
            m_toolRunner.ParseJSON(j.Finish());
            return(id);
        }
示例#13
0
        internal void GuiInput_TabletMove(object sender, WintabPacket pkt)
        {
            EzJson j = new EzJson();

            j.BeginFunction("tool_move");
            j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
            j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
            j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#14
0
        internal void GuiInput_MouseMove(object sender, MouseEventArgs e)
        {
            EzJson j = new EzJson();

            j.BeginFunction("tool_move");
            j.AddData("pressure", (128).ToString());
            j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
            j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#15
0
        internal string Gui_CreateLayer()
        {
            string id = Guid.NewGuid().ToString(); //create a globally unique id
            EzJson j  = new EzJson();

            j.BeginFunction("create_layer");
            j.AddField("layer", id);
            m_controller.GuiInput(j.Finish());
            return(id);
        }
示例#16
0
        internal void GuiInput_PointerMove(object sender, int x, int y, float pressure = 1.0f)
        {
            EzJson j = new EzJson();

            j.BeginFunction("tool_move");
            j.AddField("pressure", pressure.ToString(CultureInfo.InvariantCulture.NumberFormat));
            j.AddField("x", (int)(x / m_canvasWindow.magnification));
            j.AddField("y", (int)(y / m_canvasWindow.magnification));
            m_controller.GuiInput(j.Finish());
        }
示例#17
0
        internal void GuiInput_PointerUp(object sender, int x, int y, float pressure = 1.0f)
        {
            EzJson j = new EzJson();

            j.BeginFunction("tool_up");
            j.AddField("x", (int)(x / m_canvasWindow.magnification));
            j.AddField("y", (int)(y / m_canvasWindow.magnification));
            j.AddField("pressure", pressure);
            j.AddField("layer", selectedLayerID);
            m_controller.GuiInput(j.Finish());
        }
示例#18
0
        internal void GuiInput_MouseUp(object sender, MouseEventArgs e)
        {
            EzJson j = new EzJson();

            j.BeginFunction("tool_up");
            j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
            j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
            j.AddData("pressure", 0);
            j.AddData("layer", selectedLayerID);
            m_toolRunner.ParseJSON(j.Finish());
        }
示例#19
0
 internal void GuiInput_PointerDown(object sender, int x, int y, float pressure = 1.0f)
 {
     string toolName = m_mainForm.GetToolName();
     EzJson j = new EzJson();
     j.BeginFunction("tool_down");
     j.AddField("pressure", pressure.ToString(CultureInfo.InvariantCulture.NumberFormat));
     j.AddField("x", (int)(x / m_canvasWindow.magnification));
     j.AddField("y", (int)(y / m_canvasWindow.magnification));
     j.AddField("layer", selectedLayerID);
     j.AddField("tool", toolName);
     switch (toolName) {
         case "brush":
             j.AddObject("options", m_mainForm.GetBrushOptions());
         break;
         case "pen":
             j.AddObject("options", m_mainForm.GetPenOptions());
         break;
         default:
             j.AddField("options", "");
         break;
     }
     m_controller.GuiInput(j.Finish());
 }
 internal void GuiInput_TabletUp(object sender, WintabPacket pkt)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_up");
     j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
     j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
     j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
     j.AddData("layer", selectedLayerID);
     m_toolRunner.ParseJSON(j.Finish());
 }
 internal void GuiInput_TabletDown(object sender, WintabPacket pkt)
 {
     string toolName = m_mainForm.GetToolName();
     EzJson j = new EzJson();
     j.BeginFunction("tool_down");
     j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
     j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
     j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
     j.AddData("layer", selectedLayerID);
     j.AddData("tool", toolName);
     switch (toolName)
     {
         case "brush":
             j.AddData("options", m_mainForm.GetBrushOptions());
             break;
         case "pen":
             j.AddData("options", m_mainForm.GetPenOptions());
             break;
         default:
             j.AddData("options", null);
             break;
     }
     m_toolRunner.ParseJSON(j.Finish());
 }
 internal void GuiInput_MouseUp(object sender, MouseEventArgs e)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_up");
     j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
     j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
     j.AddData("pressure", 0);
     j.AddData("layer", selectedLayerID);
     m_toolRunner.ParseJSON(j.Finish());
 }
 internal void GuiInput_MouseMove(object sender, MouseEventArgs e)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_move");
     j.AddData("pressure", (128).ToString());
     j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
     j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
     m_toolRunner.ParseJSON(j.Finish());
 }
 internal void Gui_Undo()
 {
     EzJson j = new EzJson();
     j.BeginFunction("undo");
     j.AddData("layer", selectedLayerID);
     m_toolRunner.ParseJSON(j.Finish());
     Console.WriteLine("undo!");
 }
 internal void Gui_RenameLayer(string pLayerID, string pNewName)
 {
     EzJson j = new EzJson();
     j.BeginFunction("rename_layer");
     j.AddData("layer", pLayerID);
     j.AddData("name", pNewName);
     m_toolRunner.ParseJSON(j.Finish());
 }
示例#26
0
 internal void Gui_RenameLayer(string pLayerID, string pNewName)
 {
     EzJson j = new EzJson();
     j.BeginFunction("rename_layer");
     j.AddField("layer", pLayerID);
     j.AddField("name", pNewName);
     m_controller.GuiInput(j.Finish());
 }
示例#27
0
 internal void Gui_RemoveLayer( string pLayerID)
 {
     EzJson j = new EzJson();
     j.BeginFunction("remove_layer");
     j.AddField("layer", pLayerID);
     m_controller.GuiInput(j.Finish());
 }
示例#28
0
 internal string Gui_CreateLayer()
 {
     string id = Guid.NewGuid().ToString(); //create a globally unique id
     EzJson j = new EzJson();
     j.BeginFunction("create_layer");
     j.AddField("layer", id);
     m_controller.GuiInput(j.Finish());
     return id;
 }
示例#29
0
 internal void GuiInput_PointerUp(object sender, int x, int y, float pressure = 1.0f)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_up");
     j.AddField("x", (int)(x / m_canvasWindow.magnification));
     j.AddField("y", (int)(y / m_canvasWindow.magnification));
     j.AddField("pressure", pressure);
     j.AddField("layer", selectedLayerID);
     m_controller.GuiInput(j.Finish());
 }
示例#30
0
 internal void GuiInput_PointerMove(object sender, int x, int y, float pressure = 1.0f)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_move");
     j.AddField("pressure", pressure.ToString(CultureInfo.InvariantCulture.NumberFormat));
     j.AddField("x", (int)(x / m_canvasWindow.magnification));
     j.AddField("y", (int)(y / m_canvasWindow.magnification));
     m_controller.GuiInput( j.Finish());
 }
 internal string Gui_CreateLayer()
 {
     string id = Guid.NewGuid().ToString(); //create a globally unique id
     EzJson j = new EzJson();
     j.BeginFunction("create_layer");
     j.AddData("layer", id);
     m_toolRunner.ParseJSON(j.Finish());
     return id;
 }
 internal void Gui_RemoveLayer( string pLayerID)
 {
     EzJson j = new EzJson();
     j.BeginFunction("remove_layer");
     j.AddData("layer", pLayerID);
     m_toolRunner.ParseJSON(j.Finish());
 }
示例#33
0
 internal void Gui_SetLayerOrder(string[] pOrderedIDs)
 {
     EzJson j = new EzJson();
     j.BeginFunction("reorder_layers");
     j.AddObject("order", pOrderedIDs);
     m_controller.GuiInput(j.Finish());
 }
 internal void Gui_SetLayerOrder(string[] pOrderedIDs)
 {
     EzJson j = new EzJson();
     j.BeginFunction("reorder_layers");
     j.AddData("order", pOrderedIDs);
     m_toolRunner.ParseJSON(j.Finish());
 }
示例#35
0
 //internal void GuiInput_TabletMove(object sender, WintabPacket pkt)
 //{
 //    EzJson j = new EzJson();
 //    j.BeginFunction("tool_move");
 //    j.AddData("pressure", pkt.pkNormalPressure.pkAbsoluteNormalPressure.ToString());
 //    j.AddData("x", (int)(pkt.pkX / m_canvasWindow.magnification));
 //    j.AddData("y", (int)(pkt.pkY / m_canvasWindow.magnification));
 //    m_toolRunner.ParseJSON(j.Finish());
 //}
 internal void Gui_Undo()
 {
     EzJson j = new EzJson();
     j.BeginFunction("undo");
     j.AddField("layer", selectedLayerID);
     m_controller.GuiInput(j.Finish());
     Console.WriteLine("undo!");
 }
 internal void GuiInput_MouseDown(object sender, MouseEventArgs e)
 {
     string toolName = m_mainForm.GetToolName();
     EzJson j = new EzJson();
     j.BeginFunction("tool_down");
     j.AddData("pressure", (128).ToString());
     j.AddData("x", (int)(e.X / m_canvasWindow.magnification));
     j.AddData("y", (int)(e.Y / m_canvasWindow.magnification));
     j.AddData("layer", selectedLayerID);
     j.AddData("tool", toolName);
     switch (toolName) {
         case "brush":
             j.AddData("options", m_mainForm.GetBrushOptions());
         break;
         case "pen":
             j.AddData("options", m_mainForm.GetPenOptions());
         break;
         default:
             j.AddData("options", null);
         break;
     }
     m_toolRunner.ParseJSON(j.Finish());
 }
示例#37
0
 internal void GuiInput_PointerMove(object sender, int x, int y, float pressure = 1.0f)
 {
     EzJson j = new EzJson();
     j.BeginFunction("tool_move");
     j.AddData("pressure", (pressure).ToString());
     j.AddData("x", (int)(x / m_canvasWindow.magnification));
     j.AddData("y", (int)(y / m_canvasWindow.magnification));
     m_toolRunner.ParseJSON(j.Finish());
 }