コード例 #1
0
 internal void LoadShapes()
 {
     foreach (Shape shape in shapeHelper.BuildComponents(components))
     {
         AddShapeToCanvas?.Invoke(shape);
     }
 }
コード例 #2
0
        private void DrawPolygon(InkAnalysisInkDrawing shape)
        {
            // Part of loading back the shapes, not working at the moment
            CanvasComponent polygon = shapeHelper.BuildPolygon(shape);

            RemoveStrokes(shape);
            polygon.shape.Stroke          = new SolidColorBrush(currentBrush.Color);
            polygon.stroke                = new SolidColorBrush(currentBrush.Color).Color;
            polygon.shape.StrokeThickness = currentBrush.Size.Width;
            polygon.strokeThickness       = currentBrush.Size.Width;

            components.Add(polygon);
            AddShapeToCanvas?.Invoke(polygon.shape);
        }
コード例 #3
0
        private void DrawEllipse(InkAnalysisInkDrawing shape)
        {
            // Part of loading back the shapes, not working at the moment
            CanvasComponent ellipse = shapeHelper.BuildEllipse(shape);

            RemoveStrokes(shape);
            ellipse.shape.Stroke          = new SolidColorBrush(currentBrush.Color);
            ellipse.stroke                = new SolidColorBrush(currentBrush.Color).Color;
            ellipse.shape.StrokeThickness = currentBrush.Size.Width;
            ellipse.strokeThickness       = currentBrush.Size.Width;

            components.Add(ellipse);
            AddShapeToCanvas?.Invoke(ellipse.shape);
        }