CogOCFont ClassCognex VisionPro 9.5
Default interface of this class provides access to an optical character font's properties, Compile method, Uncompile method, and the results of compiling the font.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.OC CogOCFont

Namespace: Cognex.VisionPro.OC
Assembly: Cognex.VisionPro.OC (in Cognex.VisionPro.OC.dll) Version: 69.0.0.0
Syntax

[SerializableAttribute]
public class CogOCFont : CogObjectBase, ICogNetInternal, 
	IDisposable, ICloneable, ISerializable, ICogHasChanged, ICogChangedEvent

The CogOCFont type exposes the following members.

Constructors

  NameDescription
Public methodCogOCFont 
Constructs a new instance of this class.
Public methodCogOCFont(IntPtr)
Constructs a new instance of this class using com pointer.
Public methodCogOCFont(CogOCFont)
Constructs a new instance of this class as a deep copy of the given instance.
Top
Methods

  NameDescription
Protected methodClone
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject
Public methodCompile
Compiles this font which involves computing the confusion scores for all possible model pairings in the font.
Public methodConfusable
Returns true if the specified model pair are confusable. Two models are confusable if their Confusion score is greater than the ConfusionThreshold specified by the user.
Public methodConfusion
Get the Confusion score for the specified model pair. The Confusion score for a pair of models is the probability, on a scale of 0 to 1, that the two models will be confused with each other during verification.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExportToCvlArchive
Exports this font to the specified CVL archive as a ccOCAlphabetPtrh. If this font is compiled then the CVL will contain a compiled font.
Protected methodFinalize (Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImportFromCvlArchive
Imports a ccOCAlphabet class from the specified CVL archive file into this CogOCFont class. The archive should contain a single ccOCAlphabet. Import will try to load from the CVL archive via either a ccOCAlphabet or a ccOCAlphabetPtrh.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodUncompile
Uncompile this font.
Top
Fields

  NameDescription
Public fieldStatic memberSfCompiled
This bit will be set in the EventArgs of a Changed event every time the value returned by Compiled may have changed.
Public fieldStatic memberSfConfusable
This bit will be set in the EventArgs of a Changed event every time the value returned by Confusable may have changed.
Public fieldStatic memberSfConfusion
This bit will be set in the EventArgs of a Changed event every time the value returned by Confusion may have changed.
Public fieldStatic memberSfConfusionThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by ConfusionThreshold may have changed.
Public fieldStatic memberSfDescription
This bit will be set in the EventArgs of a Changed event every time the value returned by Description may have changed.
Public fieldStatic memberSfFontModels
This bit will be set in the EventArgs of a Changed event every time the value returned by FontModels may have changed.
Public fieldStatic memberSfTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by Timeout may have changed.
Public fieldStatic memberSfTimeoutEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by TimeoutEnabled may have changed.
Top
Properties

  NameDescription
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
Public propertyCompiled
True if the font is compiled.
Public propertyConfusionThreshold
Threshold at which two models are considered Confusable. A compiled font contains Confusion scores for all model pairs in the font. A score greater than this threshold indicates that a model pair should be considered confusing.
Public propertyDescription
Description simply provides a string for the user to store additional information or comments about their font.
Public propertyFontModels
Collection of font models for this font.
Public propertyHasChanged
If true, the serializable state of this object has changed since the last time it was serialized.
Public propertyTimeout
The maximum time (msec) allowed to compile the font. If compilation has not finished by the end of the timeout period, it will stop soon thereafter and return E_Cog_TimeoutExpired. This value only applies if TimeoutEnabled is true.
Public propertyTimeoutEnabled
If true then the Timeout property limits the amount of time allowed for compilation of the font. If false then timeout is disabled and the Timeout property is ignored.
Top
Events

  NameDescription
Public eventChanged
Occurs when one or more parts of the object's state may have changed.
Top
Remarks

Interface for an optical character font. This interface includes properties and methods that let you specify the font's confusion threshold, determine how confusable font model pairs are, and Compile the font. It also contains the collection of models that make up the font.

See Also