CogOCVMaxFont ClassCognex VisionPro
This class represents the set of geometric character descriptions associated with a single font. We read the geometric description data from a predefined font file. In general a user does not create a font file. We can, however, adjust certain characteristics of a font such as its size and line spacing.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.OCVMax CogOCVMaxFont

Namespace: Cognex.VisionPro.OCVMax
Assembly: Cognex.VisionPro.OCVMax (in Cognex.VisionPro.OCVMax.dll) Version: 65.1.0.0
Syntax

[SerializableAttribute]
public class CogOCVMaxFont : CogSerializableChangedEventBase, 
	IDisposable

The CogOCVMaxFont type exposes the following members.

Constructors

  NameDescription
Public methodCogOCVMaxFont 
Public methodCogOCVMaxFont(CogOCVMaxFont)
Protected methodCogOCVMaxFont(SerializationInfo, StreamingContext)
Top
Methods

  NameDescription
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.)
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.)
Public methodGetAvailableCharacterKeys 
Provide a list of each character key available in this font.
Public methodGetAvailableCharacterKeys(Boolean)
Provide a list of each character key available in this font.
Public methodGetAvailableCharacters
Provide a list of each character available in this font.
Public methodStatic memberGetAvailableFontNames
List the names of every font available within the specified font file.
Public methodGetCharacterFullBounds( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters.
Public methodGetCharacterFullBounds(String, CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters.
Public methodGetCharacterFullBounds( String , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters.
Public methodGetCharacterMarkBounds( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters.
Public methodGetCharacterMarkBounds(String, CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters.
Public methodGetCharacterMarkBounds( String , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters.
Public methodGetCharacterPoses( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters.
Public methodGetCharacterPoses(String, CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters.
Public methodGetCharacterPoses( String , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters.
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.)
Public methodGetDefaultBlankCharacter
Provide the default blank character for this font. Since many fonts have multiple blank characters, this method identifies the one to be used as the default blank.
Public methodGetDefaultBlankCharacterKey
Provide the key of the default blank character for this font. Since many fonts have multiple blank characters, this method identifies the one to be used as the default blank.
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.)
Public methodGetLineSpacingX
This is the (horizontal) spacing between adjacent line origins in this font, as interpreted using the supplied CogOCVMaxFontRenderParams object. Generally this will be the same as the value returned by the LineSpacingX property getter. If, however, SpotSpacingUsed is true for this font, then the value returned by this method will be the value returned by the LineSpacingX getter multiplied by the supplied render params object's SpotSpacingScaleX property.
Public methodGetLineSpacingY
This is the (vertical) spacing between adjacent line origins in this font, as interpreted using the supplied CogOCVMaxFontRenderParams object. Generally this will be the same as the value returned by the LineSpacingY property getter. If, however, SpotSpacingUsed is true for this font, then the value returned by this method will be the value returned by the LineSpacingY getter multiplied by the supplied render params object's SpotSpacingScaleY property.
Protected methodGetObjectData (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
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 methodImport(String)
Read in the first font description in the specified file. This font description will replace any previously imported font description. If you have modified SpotSize and/or LineSpacing in the currently loaded font, those settings will be lost.
Public methodImport(String, String)
Read in a new font description with the specified name from the specified file. This font description will replace any previously imported font description. If you have modified SpotSize and/or LineSpacing in the currently loaded font, those settings will be lost.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodIsBlank(Char)
Determine whether or not the supplied character is considered a blank in this font. Remember that many fonts have multiple blank characters.
Public methodIsBlank(Int32)
Determine whether or not the character corresponding to the supplied character key is considered a blank in this font. Remember that many fonts have multiple blank characters.
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.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Public methodRenderCompositeShape( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters.
Public methodRenderCompositeShape(String, CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters.
Public methodRenderCompositeShape( String , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters.
Public methodRenderImage( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create an image in which the supplied text is drawn using this font and the supplied parameters.
Public methodRenderImage(String, CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create an image in which the supplied text is drawn using this font and the supplied parameters.
Public methodRenderImage( String , CogTransform2DLinear, CogOCVMaxFontRenderParams)
Create an image in which the supplied text is drawn using this font and the supplied parameters.
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and 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.
(Inherited from CogSerializableChangedEventBase.)
Public methodSetCharacterOrigins
Set the origins as specified if the font is an image font.
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.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberSfFontName
This bit will be set in the EventArgs of a Changed event every time the value returned by FontName may have changed.
Public fieldStatic memberSfFontType
This bit will be set in the EventArgs of a Changed event every time the value returned by FontType may have changed.
Public fieldStatic memberSfGetAvailableCharacters
This bit will be set in the EventArgs of a Changed event every time the value returned by GetAvailableCharacters may have changed.
Public fieldStatic memberSfGetCharacterFullBounds
This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterFullBounds may have changed.
Public fieldStatic memberSfGetCharacterMarkBounds
This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterMarkBounds may have changed.
Public fieldStatic memberSfGetCharacterPoses
This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterPoses may have changed.
Public fieldStatic memberSfGetDefaultBlankCharacter
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDefaultBlankCharacter may have changed.
Public fieldStatic memberSfHasBlank
This bit will be set in the EventArgs of a Changed event every time the value returned by HasBlank may have changed.
Public fieldStatic memberSfImported
This bit will be set in the EventArgs of a Changed event every time the value returned by Imported may have changed.
Public fieldStatic memberSfImportFileName
This bit will be set in the EventArgs of a Changed event every time the value returned by ImportFileName may have changed.
Public fieldStatic memberSfLineSpacingX
This bit will be set in the EventArgs of a Changed event every time the value returned by LineSpacingX may have changed.
Public fieldStatic memberSfLineSpacingY
This bit will be set in the EventArgs of a Changed event every time the value returned by LineSpacingY may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfProportional
This bit will be set in the EventArgs of a Changed event every time the value returned by Proportional may have changed.
Public fieldStatic memberSfSpotSize
This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSize may have changed.
Public fieldStatic memberSfSpotSizeUsed
This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSizeUsed may have changed.
Public fieldStatic memberSfSpotSpacingUsed
This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSpacingUsed 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.
(Inherited from CogSerializableChangedEventBase.)
Public propertyCharacterOriginsSettable
Whether the font is an image font whose characters can have their origins moved using SetCharacterOrigins.
Public propertyFontName
The name of this font, as defined in the imported font file. An exception is generated if this read-only property is accessed before importing a font file.
Public propertyFontType
The intrinsic style of this font: Raster, Stroke, Outline, or Image.
Public propertyHasBlank
Whether or not this font has a blank character. Not all fonts have a blank character.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyImageFont
Whether or not this font is an image font, i.e. whether it is based on stored bitmaps of characters rather than on synthetic descriptions of characters.
Public propertyImported
Whether or not this font has been imported from a font file. True if it has, false if it has not. Most other CogOCVMaxFont properties and methods require that this be true.
Public propertyImportFileName
The name of the file from which this font was imported. An exception is generated if this read-only property is accessed before importing a font file.
Public propertyLineSpacingX
This is the (horizontal) spacing between adjacent line origins in this font.
Public propertyLineSpacingY
This is the (vertical) spacing between adjacent line origins in this font.
Public propertyProportional
Whether or not this font is proportional. A font is proportional if the characters do not all have the same advance value.
Public propertySpotSize
In a laser printer, a laser beam is swept across a photo-sensitive drum. The diameter, in microns, of the laser beam at the drum surface is the spot size. Other printing processes have their own intrinsic spot size definition. Note that not all fonts use spot size. Please check the SpotSizeUsed property first before attempting to access the SpotSize property.
Public propertySpotSizeUsed
Whether or not this font uses spot size. If this property is false, you may not get or set spot size (an exception will be thrown if you try). Like most font properties, an exception will be generated if this read-only property is accessed before importing a font file.
Public propertySpotSpacingUsed
Whether or not this font uses spot spacing. Typically, raster and stroke fonts can use spot spacing, while outline and image fonts cannot. Like most font properties, an exception will be generated if this read-only property is accessed before importing a font file.
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Top
See Also