从 InkAnalyzer 中为指定的 Stroke 清除缓存的数据。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Sub ClearStrokeData ( _
strokeToClear As Stroke _
)
用法
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
)
参数
- strokeToClear
类型:System.Windows.Ink.Stroke
要清除的缓存笔画。
备注
InkAnalyzer 为与 InkAnalyzer 关联的所有笔画维护缓存。笔画数据的更改不会自动反映在缓存中。如果笔画信息发生更改(如移动笔画),可调用此方法清除旧的笔画数据。
示例
此示例在准备移动名为 selectedStrokes 的 StrokeCollection 时更新名为 theInkAnalyzer 的 InkAnalyzer 的已更新区域,并清除该分析器的缓存。
' 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);
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0
另请参见
参考
InkAnalyzerBaseUpdateStrokeData(Int32, array<Int32[], array<Guid[])