コード例 #1
0
ファイル: FilterPlugin.cs プロジェクト: ruo2012/samples-1
 protected virtual void OnStrokeRendered(StrokeRenderedEventArgs e)
 {
     if (StrokeRendered != null)
     {
         StrokeRendered(this, e);
     }
 }
コード例 #2
0
ファイル: StylusControl.cs プロジェクト: ruo2012/samples-1
        void filterPlugin1_StrokeRendered(object sender, StrokeRenderedEventArgs e)
        {
            //MessageBox.Show("stroke rendered");
            Stroke newStroke = new Stroke(e.StrokePoints, currentAttributes);

            inkPresenter1.Strokes.Add(newStroke);
        }
コード例 #3
0
ファイル: FilterPlugin.cs プロジェクト: ruo2012/samples-1
        // This is called on the application thread.
        protected override void OnStylusUpProcessed(object callbackData, bool targetVerified)
        {
            // Check that the element actually receive the OnStylusUp input.
            if (targetVerified)
            {
                StylusPointCollection strokePoints = callbackData as StylusPointCollection;

                if (strokePoints == null)
                {
                    return;
                }

                // Raise the StrokeRendered event so the consumer of the plugin can
                // add the filtered stroke to its StrokeCollection.
                StrokeRenderedEventArgs e = new StrokeRenderedEventArgs(strokePoints);
                OnStrokeRendered(e);
            }
        }