public virtual void Up(int pX, int pY, float pPressure) { isDown = false; options = null; m_picture = null; m_layer = null; }
//------------------------------------------------------------------------- // Action to carry out when the picture focus has been changed //------------------------------------------------------------------------- public void ChangePictureFocus(Picture picture) { // Set the currently selected picture currentPicture = picture; // Rebuild the layer controls RebuildLayerControls(); }
public ToolRunner( string pUsername, Picture pPicture) { m_tools.Add("brush", new BrushTool(this)); m_tools.Add("pen", new PenTool(this)); m_tools.Add("pointer", new PointerTool(this)); username = pUsername; m_picture = pPicture; FunctionEventsEnabled = true; }
public virtual void Down(int pX, int pY, float pPressure, Picture pPicture, Layer pLayer, object pOptions) { isDown = true; m_lastPosition = new Point(pX, pY); m_lastPressure = pPressure; SetOptions(pOptions as Newtonsoft.Json.Linq.JContainer); m_layer = pLayer; m_picture = pPicture; }
//--------------------------------------------------------------------- // Constructor //--------------------------------------------------------------------- public CanvasWindow(int width = 200, int height = 200, string name = "New Picture") { InitializeComponent(); this.Text = name; m_picture = new Picture(width, height, name); this.SetClientSizeCore((int)(m_picture.Width), (int)(m_picture.Height)); m_panTool = new PanTool(this); m_zoomTool = new ZoomTool(this); SetZoom(1.0f, false); this.canvasBox.MouseDown += new MouseEventHandler(ProcessMouseDown); this.canvasBox.MouseUp += new MouseEventHandler(ProcessMouseUp); this.canvasBox.MouseMove += new MouseEventHandler(ProcessMouseMove); this.WindowState = FormWindowState.Maximized; this.MaximizeBox = false; this.MinimizeBox = false; this.ControlBox = false; tabletPressure = 1.0f; }
public Controller(Picture pPicture, CanvasWindow pWindow) { m_picture = pPicture; m_canvasWindow = pWindow; client = null; }
public override void Down(int pX, int pY, float pPressure, Picture pPicture, Layer pLayer, object pOptions) { base.Down(pX, pY, pPressure, pPicture, pLayer, pOptions); DrawStep(pLayer, new Point(pX, pY), pPressure); }