public Scenario1() { this.InitializeComponent(); rootPage.NotifyUser(" ", SDKTemplate.NotifyType.StatusMessage); // Initialize drawing attributes. These are used in inking mode. drawingAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); drawingAttributes.Color = Windows.UI.Colors.Red; double penSize = 2 + 2*PenThickness.SelectedIndex; drawingAttributes.Size = new Windows.Foundation.Size(penSize, penSize); drawingAttributes.IgnorePressure = true; drawingAttributes.FitToCurve = true; // Initialize lasso attributes. These are used in selection mode. lassoAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); lassoAttributes.Color = Windows.UI.Colors.Goldenrod; lassoAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Circle; lassoAttributes.Size = new Windows.Foundation.Size(0.5f, 0.5f); // Create the InkManager and set the drawing attributes inkManager = new Windows.UI.Input.Inking.InkManager(); inkManager.SetDefaultDrawingAttributes(drawingAttributes); renderer = new Rendering.XamlInkRenderer(InkingArea); }
public Scenario1() { //print from here ;()2:;(); #;(); #:;-;: @()2;:;();-;();();See.();records();2(); "set up git f- TWFWSW TFW TWFS TFS();"(); 1 line. 2 netx. ;()!!!!! @!!!!! this.InitializeComponent(); rootPage.NotifyUser(" ", SDKTemplate.NotifyType.StatusMessage); // Initialize drawing attributes. These are used in inking mode. drawingAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); drawingAttributes.Color = Windows.UI.Colors.Red; double penSize = 2 + 2 * PenThickness.SelectedIndex; drawingAttributes.Size = new Windows.Foundation.Size(penSize, penSize); drawingAttributes.IgnorePressure = true; drawingAttributes.FitToCurve = true; // Initialize lasso attributes. These are used in selection mode. lassoAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); lassoAttributes.Color = Windows.UI.Colors.Goldenrod; lassoAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Circle; lassoAttributes.Size = new Windows.Foundation.Size(0.5f, 0.5f); // Create the InkManager and set the drawing attributes inkManager = new Windows.UI.Input.Inking.InkManager(); inkManager.SetDefaultDrawingAttributes(drawingAttributes); renderer = new Rendering.XamlInkRenderer(InkingArea); }
void CreatePencil() { myInkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse | Windows.UI.Core.CoreInputDeviceTypes.Pen | Windows.UI.Core.CoreInputDeviceTypes.Touch; _ballPencilAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes() { Color = Colors.Black, DrawAsHighlighter = false, FitToCurve = true, IgnorePressure = false, IgnoreTilt = true, PenTip = Windows.UI.Input.Inking.PenTipShape.Circle, PenTipTransform = new System.Numerics.Matrix3x2(1, 0, 0, 1, 0, 0), Size = new Size(4, 4) }; _pencilAttributes = Windows.UI.Input.Inking.InkDrawingAttributes.CreateForPencil(); _highlighterAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes() { Color = Colors.Yellow, DrawAsHighlighter = true, FitToCurve = true, IgnorePressure = false, IgnoreTilt = true, PenTip = Windows.UI.Input.Inking.PenTipShape.Rectangle, PenTipTransform = new System.Numerics.Matrix3x2(1, 0, 0, 1, 0, 0), Size = new Size(12, 36) }; //Activate BallPencil myInkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(_ballPencilAttributes); }
// throws ArgumentException if pointerPoint.pointerId is already in live rendering mode public void EnterLiveRendering(Windows.UI.Input.PointerPoint pointerPoint, Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes) { uint pointerId = pointerPoint.PointerId; // Create and initialize the data structures necessary to render a polyline in XAML. var stroke = new Windows.UI.Xaml.Media.PolyLineSegment(); stroke.Points.Add(pointerPoint.Position); var figure = new Windows.UI.Xaml.Media.PathFigure(); figure.StartPoint = pointerPoint.Position; figure.Segments.Add(stroke); var geometry = new Windows.UI.Xaml.Media.PathGeometry(); geometry.Figures.Add(figure); var path = new Windows.UI.Xaml.Shapes.Path(); path.Data = geometry; // Set the stroke's graphical properties, which are controlled by the Path object path.Stroke = new Windows.UI.Xaml.Media.SolidColorBrush(drawingAttributes.Color); path.StrokeThickness = drawingAttributes.Size.Width; path.StrokeLineJoin = Windows.UI.Xaml.Media.PenLineJoin.Round; path.StrokeStartLineCap = Windows.UI.Xaml.Media.PenLineCap.Round; // Update dictionaries liveStrokes.Add(pointerId, stroke); // throws ArgumentException if pointerId is already in the dictionary livePaths.Add(pointerId, path); // throws ArgumentException if pointerId is already in the dictionary // Add path to render so that it is rendered (on top of all the elements with same ZIndex). // We want the live render to be on top of the Bezier render, so we set the ZIndex of the elements of the // live render to 2 and that of the elements of the Bezier render to 1. render.Children.Add(path); Windows.UI.Xaml.Controls.Canvas.SetZIndex(path, 2); }
public Scenario1() { this.InitializeComponent(); rootPage.NotifyUser(" ", SDKTemplate.NotifyType.StatusMessage); // Initialize drawing attributes. These are used in inking mode. drawingAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); drawingAttributes.Color = Windows.UI.Colors.Red; double penSize = 2 + 2 * PenThickness.SelectedIndex; drawingAttributes.Size = new Windows.Foundation.Size(penSize, penSize); drawingAttributes.IgnorePressure = true; drawingAttributes.FitToCurve = true; // Initialize lasso attributes. These are used in selection mode. lassoAttributes = new Windows.UI.Input.Inking.InkDrawingAttributes(); lassoAttributes.Color = Windows.UI.Colors.Goldenrod; lassoAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Circle; lassoAttributes.Size = new Windows.Foundation.Size(0.5f, 0.5f); // Create the InkManager and set the drawing attributes inkManager = new Windows.UI.Input.Inking.InkManager(); inkManager.SetDefaultDrawingAttributes(drawingAttributes); renderer = new Rendering.XamlInkRenderer(InkingArea); }
public DetailsView() { this.InitializeComponent(); this.inkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse | Windows.UI.Core.CoreInputDeviceTypes.Pen | Windows.UI.Core.CoreInputDeviceTypes.Touch; var attr = new Windows.UI.Input.Inking.InkDrawingAttributes(); attr.Size = new Size(5, 5); this.inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(attr); this.Loaded += DetailsView_Loaded; this.KeyDown += DetailsView_KeyDown; }
void UpdateInkAttributes(Windows.UI.Input.Inking.InkDrawingAttributes attr) { myInkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(attr); myInkCanvas.InkPresenter.InputProcessingConfiguration.Mode = Windows.UI.Input.Inking.InkInputProcessingMode.Inking; }
/// <summary> /// Initializes a new instance of the <see cref="InkDrawingAttributes"/> class, a /// Wpf-enabled wrapper for <see cref="Windows.UI.Input.Inking.InkDrawingAttributes"/> /// </summary> public InkDrawingAttributes(Windows.UI.Input.Inking.InkDrawingAttributes instance) { this.UwpInstance = instance; }