public List <InkSynchronizer.StrokeSynchronizer> BeginDry() { object lockObject = this._lockObject; List <MouseRender.StrokeInfo> list2; lock (lockObject) { List <MouseRender.StrokeInfo> list = this._strokeInfoList.ToList <MouseRender.StrokeInfo>(); if (!false) { list2 = list; } this._strokeInfoList.Clear(); } List <InkSynchronizer.StrokeSynchronizer> list3 = new List <InkSynchronizer.StrokeSynchronizer>(); foreach (MouseRender.StrokeInfo strokeInfo in list2) { if (strokeInfo != null) { MouseRender.InkRenderInfo inkRenderInfo = strokeInfo.InkRenderInfo; StylusPointCollection inkRenderInfoStylusPointList = this.GetInkRenderInfoStylusPointList(inkRenderInfo); if (inkRenderInfoStylusPointList != null && inkRenderInfoStylusPointList.Any <StylusPoint>()) { list3.Add(new InkSynchronizer.StrokeSynchronizer(inkRenderInfoStylusPointList, strokeInfo.StylusDeviceId, strokeInfo.DrawingAttributes) { LostCapture = strokeInfo.LostCapture }); } DryingDrawingVisual dryingDrawingVisual = new DryingDrawingVisual(inkRenderInfo.ContainerVisual, InkRenderVisual.GetInkRenderDryingDrawVisual(inkRenderInfo)); this._dynamicRenderer.InkCanvas.AddDryingDrawingVisualList(dryingDrawingVisual); } } return(list3); }
private StylusPointCollection GetInkRenderInfoStylusPointList(MouseRender.InkRenderInfo inkRender) { StylusPointCollection stylusPointCollection = this.GetStylusPointsFromStrokeVisualList(inkRender.StrokeVisualList); MouseRender.InkStrokeTipBuilder strokeTipBuilder = inkRender.StrokeTipBuilder; MouseRender.InkStrokeTipBuilder inkStrokeTipBuilder; if (true) { inkStrokeTipBuilder = strokeTipBuilder; } if (inkStrokeTipBuilder != null) { StylusPointCollection strokeTipCollection = inkStrokeTipBuilder.StrokeTipCollection; if (strokeTipCollection != null && strokeTipCollection.Any <StylusPoint>()) { if (2 != 0 && stylusPointCollection != null) { stylusPointCollection.Add(strokeTipCollection); } else { try { stylusPointCollection = this.CloneStylusPointCollection(strokeTipCollection); } catch (Exception) { } } } } return(stylusPointCollection); }
public static List <DrawingVisual> GetInkRenderDryingDrawVisual(MouseRender.InkRenderInfo inkRender) { List <DrawingVisual> dryingDrawVisualFromStrokeVisualList; dryingDrawVisualFromStrokeVisualList = InkRenderVisual.GetDryingDrawVisualFromStrokeVisualList(inkRender.StrokeVisualList); MouseRender.InkStrokeTipBuilder strokeTipBuilder = inkRender.StrokeTipBuilder; DrawingVisual drawingVisual = (strokeTipBuilder != null) ? ((MouseRender.IInkStrokeTipBuilder)strokeTipBuilder).GetBuildingStroke() : null; DrawingVisual drawingVisual2; drawingVisual2 = drawingVisual; if (drawingVisual2 != null) { dryingDrawVisualFromStrokeVisualList.Add(drawingVisual2); } return(dryingDrawVisualFromStrokeVisualList); }