MocrModifyFont()函数

Synopsis

Invert or resize a font to match the target image characters.

Format

MIL_ID MocrModifyFont(FontId, Operation, ControlValue)

MIL_ID FontId; Font identifier
long Operation; Operation
long ControlValue; Control value

Description

This function inverts or resizes an existing font. When inverting, this function changes the foreground value (see MocrAllocFont) to match that of the target image characters. When rescaling, this function uses the current target characters X and Y size and spacing control values. It is typically called after MocrCalibrateFont has determined these values or when they have been set with MocrControl.

The user can employ MocrModifyFont to save the time of resizing the target image during each read/verify operation. In some cases it is faster to resize the font once to match the size of the strings in the target images rather than resizing each target image to match the font with each read/verify operation.

Resizing with MocrModifyFont can increase read/verify speed especially when the character size in the target image is smaller than or very close to the default font character size. If, however, the target image characters are larger than the default font characters, the processing time might be greater. This could occur if the actual resize time is less than the additional processing time required by the larger font.

The FontId parameter specifies the buffer identifier of the font to invert or scale.

The Operation parameter specifies the type of operation to perform. It can be set to either M_INVERT or M_RESIZE.

The ControlValue parameter specifies the control value and should be set to M_DEFAULT if Operation has been set to M_INVERT. If Operation has been set to M_RESIZE, the ControlValue determines the mode of interpolation and should be set to either: M_BILINEAR, M_BICUBIC, or M_DEFAULT.

See also

MocrAllocFont, MocrCalibrateFont, MocrControl

《MocrModifyFont()函数》上有1条评论

评论已关闭。