Exemple #1
0
        public void ActionPointerReleased(object sender, PointerRoutedEventArgs e)
        {
            if (isMouseDownOnCanvas)
            {
                byte[] b1 = canvas.ImageDataLayer.BitmapDrawingData.PixelBuffer.ToArray();
                byte[] b  = new byte[b1.Length];
                b1.CopyTo(b, 0);
                History.EndAction(new Models.Action(b));
                isMouseDownOnCanvas = false;
            }

            if (type == 10)
            {
                SelectionTool.SelectRelease();
            }
            if (type == 11)
            {
                StraightLineTool.StraightLineRelease();
            }

            canvas.ImageDataLayer.BitmapDrawingData.Invalidate();
        }
 private void cmdLine_Click(object sender, EventArgs e)
 {
     CurrentTool = new StraightLineTool(picPaper, grBuf, tempPen);
 }