Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }