private void GraphMain_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e)
        {
            MainSurface = e.Surface;
            MainCanvas  = MainSurface.Canvas;

            if (refresh)
            {
                MainCanvas.Clear(SKColors.Black);
                refresh = false;
            }
            // draw eraser
            MainCanvas.DrawRect(currentX, 0, 40, graphMain.CanvasSize.Height, ErasePaint);

            if (ClearFlag)
            {
                //MainCanvas.Clear(SKColors.Transparent);
                ClearFlag = false;
                if (displayArray1 != null && displayArray1.Length > 0)
                {
                    MainCanvas.DrawPoints(PointMode2, displayArray1, GraphPaint1);
                }
            }
            else
            {
                if (displayArray1 != null && displayArray1.Length > 0)
                {
                    MainCanvas.DrawPoints(PointMode1, displayArray1, GraphPaint1);
                }
            }
        }
        private void GraphMain_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e)
        {
            MainSurface = e.Surface;
            MainCanvas  = MainSurface.Canvas;

            if (refresh)
            {
                MainCanvas.Clear(SKColors.Transparent);
                refresh = false;
            }
            // draw eraser

            parameter1Array = parameter1List.ToArray();
            MainCanvas.DrawPoints(PointMode1, parameter1Array, GraphPaint1);

            parameter2Array = parameter2List.ToArray();
            MainCanvas.DrawPoints(PointMode1, parameter2Array, GraphPaint2);

            parameter3Array = parameter3List.ToArray();
            MainCanvas.DrawPoints(PointMode1, parameter3Array, GraphPaint3);

            parameter4Array = parameter4List.ToArray();
            MainCanvas.DrawPoints(PointMode1, parameter4Array, GraphPaint4);

            parameter5Array = parameter5List.ToArray();
            MainCanvas.DrawPoints(PointMode1, parameter5Array, GraphPaint5);

            //MainCanvas.DrawRect(currentX + xStepSize, 0, 40, graphMain.CanvasSize.Height, ErasePaint);

            firstValueCounter++;
        }
Exemple #3
0
        private void GraphMain_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e)
        {
            MainSurface = e.Surface;
            MainCanvas  = MainSurface.Canvas;

            if (clearRefreshCounter > ClearRefreshRate)
            {
                clearRefreshCounter = 0;
                refresh             = true;
            }
            clearRefreshCounter++;


            if (refresh)
            {
                MainCanvas.Clear(SKColors.Transparent);
                refresh = false;
            }


            if (displayArray1 != null && displayArray1.Length > 0)
            {
                MainCanvas.DrawPoints(PointMode1, displayArray1, GraphPaint1);
            }
        }
Exemple #4
0
 private void RedrawCanvas()
 {
     MainCanvas.Clear();
     if (drawingOptions.DrawBoundingBoxes)
     {
         DrawBoundingBoxes();
     }
     if (drawingOptions.DrawSkeletons)
     {
         DrawSkeletons();
     }
     DrawWeights();
     DrawCurves();
     if (drawingOptions.DrawExtrema)
     {
         DrawExtrema();
     }
     if (drawingOptions.DrawIntersections)
     {
         DrawIntersections();
     }
 }
Exemple #5
0
 private void BtnClear_Click(object sender, EventArgs e)
 {
     MainCanvas.Clear();
 }
Exemple #6
0
 private void ClearBtn_Click(object sender, RoutedEventArgs e)
 {
     MainCanvas.Clear();
 }