InkAnalyzer.Load Method (Byte[], Boolean)
Loads saved analysis results into the InkAnalyzer. Optionally loads the ink data to the associated Microsoft.Ink.Ink object.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)
Syntax
'Declaration
Public Function Load ( _
serializedResults As Byte(), _
doNotAutoAddStrokes As Boolean _
) As Boolean
'Usage
Dim instance As InkAnalyzer
Dim serializedResults As Byte()
Dim doNotAutoAddStrokes As Boolean
Dim returnValue As Boolean
returnValue = instance.Load(serializedResults, doNotAutoAddStrokes)
public bool Load (
byte[] serializedResults,
bool doNotAutoAddStrokes
)
public:
bool Load (
array<unsigned char>^ serializedResults,
bool doNotAutoAddStrokes
)
public boolean Load (
byte[] serializedResults,
boolean doNotAutoAddStrokes
)
public function Load (
serializedResults : byte[],
doNotAutoAddStrokes : boolean
) : boolean
Not applicable.
Parameters
- serializedResults
An 8-bit unsigned integer array that contains the saved analysis results.
- doNotAutoAddStrokes
true to not add saved ink data to the associated ink; otherwise, false.
Return Value
true if the analysis results loaded successfully; otherwise, false.
Remarks
If ink data is included in the analysis results and doNotAutoAddStrokes is false, the InkAnalyzer adds the saved strokes to the ink analyzer's Ink property.
When the InkAnalyzer adds a ContextNode from the saved results, it assigns a new globally unique identifier (GUID) to the ContextNode object's Id property.
This method appends the saved analysis results to existing results. To ensure that the combined results are ordered correctly, add the area containing the loaded context nodes to the ink analyzer's DirtyRegion and reanalyze the ink.
If the InkAnalyzer adds the saved strokes to the associated Microsoft.Ink.Ink object, the loaded analysis results reference the loaded strokes in the associated ink.
If the analyzer does not add the saved strokes to the associated Microsoft.Ink.Ink object, the analyzer compares the stroke identifiers in the saved results with the stroke identifiers in the existing Microsoft.Ink.Ink object to associate the loaded analysis results with the existing strokes.
If a saved analysis hint conflicts with an existing analysis hint, the ink analyzer does not load the saved hint but does load the rest of the saved results. However, if saved stroke data is within the area of a saved analysis hint that is not loaded, the analyzer adds the bounding box of the stroke to the analyzer's DirtyRegion. Also, if saved stroke data is within an existing analysis hint's area, the analyzer also adds the bounding box of the stroke to the analyzer's DirtyRegion. For more information about analysis hints, see AnalysisHintNode.
The InkAnalyzer raises the ContextNodeCreated, ContextNodeLinkAdding, and ContextNodePropertiesUpdated events as it loads the saved results.
Example
This example loads saved analysis results from an 8-bit unsigned integer array, theSavedResults
, into the InkAnalyzer, theInkAnalyzer
. However, it does not load saved ink data to the analyzer's associated Microsoft.Ink.Ink object.
' Load previously saved analysis results, but do not load
' associated ink data.
successful = Me.theInkAnalyzer.Load(theSavedResults, True)
// Load previously saved analysis results, but do not load
// associated ink data.
successful = this.theInkAnalyzer.Load(theSavedResults, true);
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
Microsoft.Ink Namespace
InkAnalyzer.Ink
Microsoft.Ink.InkAnalyzer.SaveResults
Microsoft.Ink.ContextNode
Microsoft.Ink.Ink
Microsoft.Ink.Stroke