Partager via


InkAnalyzer.ClearStrokeData Method

Clears the cached data from the InkAnalyzer for the specified Stroke.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

'Declaration
Public Sub ClearStrokeData ( _
    strokeToClear As Stroke _
)
'Usage
Dim instance As InkAnalyzer
Dim strokeToClear As Stroke

instance.ClearStrokeData(strokeToClear)
public void ClearStrokeData (
    Stroke strokeToClear
)
public:
void ClearStrokeData (
    Stroke^ strokeToClear
)
public void ClearStrokeData (
    Stroke strokeToClear
)
public function ClearStrokeData (
    strokeToClear : Stroke
)
Not applicable.

Parameters

  • strokeToClear
    The cached stroke to clear.

Remarks

The InkAnalyzer maintains a cache for all of the strokes associated with the InkAnalyzer. Changes to stroke data are not automatically reflected in the cache. When stroke information changes, such as when you move a stroke, call this method to clear the old stroke data.

Example

This example updates the dirty region of the InkAnalyzer, theInkAnalyzer, and clears the analyzer's cache in preparation for moving the StrokeCollection, selectedStrokes.

' Update the analyzer's dirty region to include the original
' bounding box of the strokes that are moving.
Me.theInkAnalyzer.DirtyRegion.Union(selectedStrokes.GetBounds())

' Clear the analyzer's cache for each stroke that is moving.
Dim theStroke As Stroke
For Each theStroke In selectedStrokes
    Me.theInkAnalyzer.ClearStrokeData(theStroke)
Next theStroke
// Update the analyzer's dirty region to include the original
// bounding box of the strokes that are moving.
this.theInkAnalyzer.DirtyRegion.Union(selectedStrokes.GetBounds());

// Clear the analyzer's cache for each stroke that is moving.
foreach (Stroke theStroke in selectedStrokes)
{
    this.theInkAnalyzer.ClearStrokeData(theStroke);
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class
InkAnalyzer Members
System.Windows.Ink Namespace
System.Windows.Ink.InkAnalyzerBase.UpdateStrokeData(System.Int32,System.Int32[],System.Guid[])