Example #1
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());
        }
Example #2
0
        internal void Gui_SetLayerOrder(string[] pOrderedIDs)
        {
            EzJson j = new EzJson();

            j.BeginFunction("reorder_layers");
            j.AddObject("order", pOrderedIDs);
            m_controller.GuiInput(j.Finish());
        }
Example #3
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());
 }
Example #4
0
 internal void Gui_SetLayerOrder(string[] pOrderedIDs)
 {
     EzJson j = new EzJson();
     j.BeginFunction("reorder_layers");
     j.AddObject("order", pOrderedIDs);
     m_controller.GuiInput(j.Finish());
 }