textapi.cpp File Reference


Functions

LONG BCGetMaximumTextIndex ()
 Gets the maximum text index. Returns the maximum index of available text objects.
See also:
BCSetActiveTextIndex(), BCGetActiveTextIndex()
Return values:
LONG   The maximum index. ----------------------------------------------------------------------------.


LONG BCGetActiveTextIndex (t_BarCode* pBarCode)
 Gets the currently active text index. Returns the index of the currently active/selected text.
A return value of
\li 0 ... means that the human readable text is active (this is the default) \li >0 ... means that the extra text with given index [1 .. n] is active The user can only change the settings of the text that is currently active.
That means that if the user calls the function <CODE>BCSetActiveTextIndex(pBarCode, 1)</CODE> all future calls will be applied to text object #1 until another text object is activated in the same manner. \par Following functions are affected by BCSetActiveTextIndex(): BCSetDisplayText(), BCSetTextRotation(), BCSetLogFont(), BCSetTextAlignment(), BCSetTextPosition(), BCSetPrintText(), BCSetFontName(), BCSetFontHeight(), BCSetFontColor() \par BCGetDisplayText(), BCGetTextRotation(), BCGetLogFont(), BCGetTextAlignment(), BCGetTextPosition(), BCGetPrintText(), BCGetFontName(), BCGetFontHeight(), BCGetFontColor(), BCGetTextClipping(), BCIsWordWrappingEnabled() \param[in] pBarCode Pointer to barcode structure. \retval LONG The index of the currently active text setting.
----------------------------------------------------------------------------.


ERRCODE BCSetActiveTextIndex (t_BarCode* pBarCode, LONG nIndex)
 Sets the currently active text index. The user can only change the setting of the text that is currently active.
That means that if the user calls the function <CODE>BCSetActiveTextIndex(pBarCode, 1)</CODE> all future calls will be applied to text object #1 until another text object is activated in the same manner. \par Following functions are affected by BCSetActiveTextIndex(): BCSetDisplayText(), BCSetTextRotation(), BCSetLogFont(), BCSetTextAlignment(), BCSetTextPosition(), BCSetPrintText(), BCSetFontName(), BCSetFontHeight(), BCSetFontColor() \par BCGetDisplayText(), BCGetTextRotation(), BCGetLogFont(), BCGetTextAlignment(), BCGetTextPosition(), BCGetPrintText(), BCGetFontName(), BCGetFontHeight(), BCGetFontColor(), BCGetTextClipping(), BCIsWordWrappingEnabled() \note By default the human readable text (index 0) is the active text. \par You can change the position and size of an extra text but not that of the human readable text. \param[in] pBarCode Pointer to barcode structure. A value of 0 ... means that the <i>human readable text</i> becomes active (this is the default) >0 ... means that the <i>extra text</i> with given index [1 .. n] becomes active \param[in] nIndex The new active text index. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred
----------------------------------------------------------------------------.


LOGFONTA* BCGetLogFont (t_BarCode* pBarCode)
 Gets the font of the currently active text object (usually the human readable text - Windows only). Returns currently adjusted value.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
We are using 8 Byte alignment! \par Windows only For UNIX use BCGetFontName() and BCGetFontHeight() instead. \see BCSetLogFont(), BCGetActiveTextIndex(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval LOGFONTA* Pointer to LOGFONTA structure.
----------------------------------------------------------------------------.


ERRCODE BCSetLogFont (t_BarCode* pBarCode, const LOGFONTA* lf)
 Sets the font of the currently active text object (usually the human readable text - Windows only). Sets the font characteristics used for the human readable text and the extra texts.
Note:
Pass a LOGFONTA structure. The font size in field lfHeight must be given in Point [1/72"]. We suggest to leave the field lfWidth 0. If you have to change it, you must set the width in 1/1000 mm.
Usage for printing and BCSaveImage() \code // LOGFONTA font size = size [point] pFont->lfHeight = sizeInPoints; // unit = [point] \endcode \note The currently active text object can be selected by calling BCSetActiveTextIndex(). \par We are using 8 Byte alignment! \par Windows only For UNIX use BCSetFontName() and BCSetFontHeight() instead. \see BCGetLogFont() \param[in] pBarCode Pointer to barcode structure. \param[in] lf Pointer to LOGFONTA structure. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


ERRCODE BCSetPrintText (t_BarCode* pBarCode, BOOL bReadable, BOOL bAbove)
 Sets options concerning the currently active text (usually the human readable text). Determines whether the currently active text should be printed and where it should be located (below or above the bar code).
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
The parameter <i>bAbove</i> can only be applied to the human readable text and is ignored by the <i>extra text</i> objects. \see BCGetPrintText(), BCGetTextAbove(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] bReadable Print human readable text. - true: Text is printed (this is the default) - false: Text is not printed \param[in] bAbove Print human readable text above barcode. - true: Text is printed above barcode - false: Text is printed below barcode (this is the default) \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


BOOL BCGetPrintText (t_BarCode* pBarCode)
 Determines if the currently active text object (usually the human readable text) is visible.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCSetPrintText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Text is shown (This is the default for the human readable text).
false   Text is not shown (This is the default for the extra texts). ----------------------------------------------------------------------------.


BOOL BCGetTextAbove (t_BarCode* pBarCode)
 Determines if human-readable text is printed below or above the barcode.
Note:
This function is only supported by the human readable text but NOT by the extra texts.
See also:
BCSetPrintText() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Text is printed above barcode
false   Text is printed below barcode. This is the default ----------------------------------------------------------------------------.


LPCSTR BCGetDisplayTextA (t_BarCode* pBarCode)
 Retrieves the content of the currently active text object (usually the human readable text).
Note:
This function returns the value that was previously set by BCSetDisplayText(). It does NOT return the bar code content.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetDisplayText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval NULL No value set. This is the default \retval LPCSTR Human readable text
----------------------------------------------------------------------------.


LPCWSTR BCGetDisplayTextW (t_BarCode* pBarCode)
 Retrieves the content of the currently active text object (usually the human readable text).
Note:
This function returns the value that was previously set by BCSetDisplayText(). It does NOT return the bar code content.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetDisplayText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval NULL No value set. This is the default \retval LPCSTR Human readable text
----------------------------------------------------------------------------.


ERRCODE BCSetDisplayTextA (t_BarCode* pBarCode, LPCSTR szText)
 Sets the content of the currently active text object (usually the human readable text).
Note:
BCSetDisplayText can be used to override the human readable text which normally would contain the bar code content (only if the human readable text is currently active).
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetDisplayText(), BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Display text (reset to default: null). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


ERRCODE BCSetDisplayTextW (t_BarCode* pBarCode, LPCWSTR szText)
 Sets the content of the currently active text object (usually the human readable text).
Note:
BCSetDisplayText can be used to override the human readable text which normally would contain the bar code content (only if the human readable text is currently active).
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetDisplayText(), BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Display text (reset to default: null). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


e_BCAlign BCGetTextAlignment (t_BarCode* pBarCode)
 Gets the alignment of the currently active text object (usually the human readable text).
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_BCAlign   Alignment enumerator ----------------------------------------------------------------------------.


ERRCODE BCSetTextAlignment (t_BarCode* pBarCode, e_BCAlign eAlign)
 Sets the alignment of the currently active text object (usually the human readable text). The default is center alignment.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCGetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] eAlign Text alignment enumerator.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


LONG BCGetTextDist (t_BarCode* pBarCode)
 Retrieves the distance between the human readable text and the barcode.
Note:
This function is only supported by the human readable text and NOT by the extra texts.
See also:
BCSetTextDist() \param[in] pBarCode Pointer to barcode structure.
Return values:
-1   No value set - distance is computed automatically. This is the default
LONG   Distance between barcode and human readable text [1/1000 mm] ----------------------------------------------------------------------------.


ERRCODE BCSetTextDist (t_BarCode* pBarCode, LONG nTextDist)
 Sets the distance between the human readable text and the barcode. The default text distance is computed by TBarCode automatically, but can be overridden by calling BCSetTextDist().
Note:
This function is only supported by the human readable text but NOT by the extra texts.
See also:
BCGetTextDist(), BCSetLogFont() \param[in] pBarCode Pointer to barcode structure. \param[in] nTextDist Distance between barcode and human readable text [1/1000 mm] (-1 ... reset to default).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


CHAR* BCGetFontNameA (t_BarCode* pBarCode)
 Gets the font of the currently active text object (usually the human readable text).
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
CHAR   * Name of font as a zero-terminated string. ----------------------------------------------------------------------------.


WCHAR* BCGetFontNameW (t_BarCode* pBarCode)
 Gets the font of the currently active text object (usually the human readable text).
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
CHAR   * Name of font as a zero-terminated string. ----------------------------------------------------------------------------.


ERRCODE BCSetFontNameA (t_BarCode* pBarCode, const CHAR* szName)
 Sets the font of the currently active text object (usually the human readable text). The name of the font depends on the output format, for example:
\li Postscript accepts names such as Helvetica, Courier, Times-Roman, Helvetica-Bold, etc.
\li PCL accepts names and font numbers such as Helvetica (maps to 16602), Times (maps to 4101), Courier (maps to 4099) or any font number (optional: name and number can be followed by 'Bold')
Consult a Postscript or PCL reference for more information.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] szName Font name.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSetFontNameW (t_BarCode* pBarCode, const WCHAR* szName)
 Sets the font of the currently active text object (usually the human readable text). The name of the font depends on the output format, for example:
\li Postscript accepts names such as Helvetica, Courier, Times-Roman, Helvetica-Bold, etc.
\li PCL accepts names and font numbers such as Helvetica (maps to 16602), Times (maps to 4101), Courier (maps to 4099) or any font number (optional: name and number can be followed by 'Bold')
Consult a Postscript or PCL reference for more information.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] szName Font name.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


INT BCGetFontHeight (t_BarCode* pBarCode)
 Gets the font size in Point of the currently active text object (usually the human readable text).
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
INT   Font size in points. ----------------------------------------------------------------------------.


ERRCODE BCSetFontHeight (t_BarCode* pBarCode, INT nHeight)
 Sets the font size [points] of the currently active text object (usually the human readable text). If the font size is not set, a suitable font size is automatically calculated depending on the barcode type and barcode dimensions.
Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] nHeight Font height.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


RECT BCGetTextPosition (t_BarCode* pBarCode)
 Gets the position of the currently active text object. The text position is specified by a bounding rectangle. The coordinates of this rectangle are relative to the bar code's bounding rectangle.
Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval RECT The bounding rectangle of the text.
----------------------------------------------------------------------------.


BOOL BCGetTextClipping (t_BarCode* pBarCode)
 Determines if the currently active text object (usually the human readable text) is clipped.
Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval true Text is clipped. \retval false Text is not clipped.
----------------------------------------------------------------------------.


BOOL BCIsWordWrappingEnabled (t_BarCode* pBarCode)
 [NOT IMPLEMENTED YET!]
Determines if word wrapping is enabled for the currently active text object (usually the human readable text).
NOT IMPLEMENTED YET \note Works only if the currently <b>active</b> text is <b>NOT</b> the human readable text (with index 0) but one of the extra text objects. \par The currently active text object can be selected by calling BCSetActiveTextIndex().. \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval true Text is word wrapped. \retval false Text is not word wrapped.
----------------------------------------------------------------------------.


ERRCODE BCSetTextPosition (t_BarCode* pBarCode, RECT* pRect, BOOL bClipping, BOOL bWordWrap)
 Sets the position of the currently active text object. The text position is specified by a bounding rectangle. The coordinates of this rectangle are relative to the bar code's bounding rectangle.
Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] pRect The bounding rectangle of the text. \param[in] bClipping Determine whether the active text should be clipped. \param[in] bWordWrap [NOT IMPLEMENTED YET!]\n Determine whether the active text should be word wrapped in the bounding rectangle. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


e_Degree BCGetTextRotation (t_BarCode* pBarCode)
 Gets the the rotation of the currently active text object. The text rotation is defined relatively to the bar code rotation. This means that both rotation values will be added.
Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCSetTextRotation() \param[in] pBarCode Pointer to barcode structure. \retval e_Degree The text rotation (counter-clockwise).
----------------------------------------------------------------------------.


ERRCODE BCSetTextRotation (t_BarCode* pBarCode, e_Degree eRotation)
 Sets the the rotation of the currently active text object. The text rotation is defined relatively to the bar code rotation. This means that both rotation values will be added.
Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCGetTextRotation() \param[in] pBarCode Pointer to barcode structure. \param[in] eRotation The text rotation (counter-clockwise). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


DOUBLE BCGetCharacterSpacing (t_BarCode* pBarCode)
 Gets the the character spacing of the currently active text object. Positive values increment the spacing, negative values decrement it.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCSetCharacterSpacing() \param[in] pBarCode Pointer to barcode structure. \retval DOUBLE The character spacing in points.
----------------------------------------------------------------------------.


ERRCODE BCSetCharacterSpacing (t_BarCode* pBarCode, DOUBLE spacing)
 Sets the the character spacing of the currently active text object. Positive values increment the spacing, negative values decrement it. The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCGetCharacterSpacing() \param[in] pBarCode Pointer to barcode structure. \param[in] spacing The character spacing in points.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.



Function Documentation

LONG BCGetActiveTextIndex ( t_BarCode * pBarCode )

Gets the currently active text index. Returns the index of the currently active/selected text.
A return value of
\li 0 ... means that the human readable text is active (this is the default) \li >0 ... means that the extra text with given index [1 .. n] is active The user can only change the settings of the text that is currently active.

That means that if the user calls the function <CODE>BCSetActiveTextIndex(pBarCode, 1)</CODE> all future calls will be applied to text object #1 until another text object is activated in the same manner. \par Following functions are affected by BCSetActiveTextIndex(): BCSetDisplayText(), BCSetTextRotation(), BCSetLogFont(), BCSetTextAlignment(), BCSetTextPosition(), BCSetPrintText(), BCSetFontName(), BCSetFontHeight(), BCSetFontColor() \par BCGetDisplayText(), BCGetTextRotation(), BCGetLogFont(), BCGetTextAlignment(), BCGetTextPosition(), BCGetPrintText(), BCGetFontName(), BCGetFontHeight(), BCGetFontColor(), BCGetTextClipping(), BCIsWordWrappingEnabled() \param[in] pBarCode Pointer to barcode structure. \retval LONG The index of the currently active text setting.
----------------------------------------------------------------------------.

DOUBLE BCGetCharacterSpacing ( t_BarCode * pBarCode )

Gets the the character spacing of the currently active text object. Positive values increment the spacing, negative values decrement it.

The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCSetCharacterSpacing() \param[in] pBarCode Pointer to barcode structure. \retval DOUBLE The character spacing in points.
----------------------------------------------------------------------------.

LPCSTR BCGetDisplayTextA ( t_BarCode * pBarCode )

Retrieves the content of the currently active text object (usually the human readable text).

Note:
This function returns the value that was previously set by BCSetDisplayText(). It does NOT return the bar code content.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetDisplayText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval NULL No value set. This is the default \retval LPCSTR Human readable text
----------------------------------------------------------------------------.

LPCWSTR BCGetDisplayTextW ( t_BarCode * pBarCode )

Retrieves the content of the currently active text object (usually the human readable text).

Note:
This function returns the value that was previously set by BCSetDisplayText(). It does NOT return the bar code content.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetDisplayText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval NULL No value set. This is the default \retval LPCSTR Human readable text
----------------------------------------------------------------------------.

INT BCGetFontHeight ( t_BarCode * pBarCode )

Gets the font size in Point of the currently active text object (usually the human readable text).

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
INT   Font size in points. ----------------------------------------------------------------------------.

CHAR * BCGetFontNameA ( t_BarCode * pBarCode )

Gets the font of the currently active text object (usually the human readable text).

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
CHAR   * Name of font as a zero-terminated string. ----------------------------------------------------------------------------.

WCHAR * BCGetFontNameW ( t_BarCode * pBarCode )

Gets the font of the currently active text object (usually the human readable text).

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure.
Return values:
CHAR   * Name of font as a zero-terminated string. ----------------------------------------------------------------------------.

LOGFONTA * BCGetLogFont ( t_BarCode * pBarCode )

Gets the font of the currently active text object (usually the human readable text - Windows only). Returns currently adjusted value.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
We are using 8 Byte alignment! \par Windows only For UNIX use BCGetFontName() and BCGetFontHeight() instead. \see BCSetLogFont(), BCGetActiveTextIndex(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval LOGFONTA* Pointer to LOGFONTA structure.
----------------------------------------------------------------------------.

LONG BCGetMaximumTextIndex ( )

Gets the maximum text index. Returns the maximum index of available text objects.

See also:
BCSetActiveTextIndex(), BCGetActiveTextIndex()
Return values:
LONG   The maximum index. ----------------------------------------------------------------------------.

BOOL BCGetPrintText ( t_BarCode * pBarCode )

Determines if the currently active text object (usually the human readable text) is visible.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCSetPrintText(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Text is shown (This is the default for the human readable text).
false   Text is not shown (This is the default for the extra texts). ----------------------------------------------------------------------------.

BOOL BCGetTextAbove ( t_BarCode * pBarCode )

Determines if human-readable text is printed below or above the barcode.

Note:
This function is only supported by the human readable text but NOT by the extra texts.
See also:
BCSetPrintText() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Text is printed above barcode
false   Text is printed below barcode. This is the default ----------------------------------------------------------------------------.

e_BCAlign BCGetTextAlignment ( t_BarCode * pBarCode )

Gets the alignment of the currently active text object (usually the human readable text).

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_BCAlign   Alignment enumerator ----------------------------------------------------------------------------.

BOOL BCGetTextClipping ( t_BarCode * pBarCode )

Determines if the currently active text object (usually the human readable text) is clipped.

Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval true Text is clipped. \retval false Text is not clipped.
----------------------------------------------------------------------------.

LONG BCGetTextDist ( t_BarCode * pBarCode )

Retrieves the distance between the human readable text and the barcode.

Note:
This function is only supported by the human readable text and NOT by the extra texts.
See also:
BCSetTextDist() \param[in] pBarCode Pointer to barcode structure.
Return values:
-1   No value set - distance is computed automatically. This is the default
LONG   Distance between barcode and human readable text [1/1000 mm] ----------------------------------------------------------------------------.

RECT BCGetTextPosition ( t_BarCode * pBarCode )

Gets the position of the currently active text object. The text position is specified by a bounding rectangle. The coordinates of this rectangle are relative to the bar code's bounding rectangle.

Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval RECT The bounding rectangle of the text.
----------------------------------------------------------------------------.

e_Degree BCGetTextRotation ( t_BarCode * pBarCode )

Gets the the rotation of the currently active text object. The text rotation is defined relatively to the bar code rotation. This means that both rotation values will be added.

Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCSetTextRotation() \param[in] pBarCode Pointer to barcode structure. \retval e_Degree The text rotation (counter-clockwise).
----------------------------------------------------------------------------.

BOOL BCIsWordWrappingEnabled ( t_BarCode * pBarCode )

[NOT IMPLEMENTED YET!]
Determines if word wrapping is enabled for the currently active text object (usually the human readable text).

NOT IMPLEMENTED YET \note Works only if the currently <b>active</b> text is <b>NOT</b> the human readable text (with index 0) but one of the extra text objects. \par The currently active text object can be selected by calling BCSetActiveTextIndex().. \see BCSetTextPosition(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \retval true Text is word wrapped. \retval false Text is not word wrapped.
----------------------------------------------------------------------------.

ERRCODE BCSetActiveTextIndex ( t_BarCode * pBarCode,
LONG nIndex )

Sets the currently active text index. The user can only change the setting of the text that is currently active.

That means that if the user calls the function <CODE>BCSetActiveTextIndex(pBarCode, 1)</CODE> all future calls will be applied to text object #1 until another text object is activated in the same manner. \par Following functions are affected by BCSetActiveTextIndex(): BCSetDisplayText(), BCSetTextRotation(), BCSetLogFont(), BCSetTextAlignment(), BCSetTextPosition(), BCSetPrintText(), BCSetFontName(), BCSetFontHeight(), BCSetFontColor() \par BCGetDisplayText(), BCGetTextRotation(), BCGetLogFont(), BCGetTextAlignment(), BCGetTextPosition(), BCGetPrintText(), BCGetFontName(), BCGetFontHeight(), BCGetFontColor(), BCGetTextClipping(), BCIsWordWrappingEnabled() \note By default the human readable text (index 0) is the active text. \par You can change the position and size of an extra text but not that of the human readable text. \param[in] pBarCode Pointer to barcode structure. A value of 0 ... means that the <i>human readable text</i> becomes active (this is the default) >0 ... means that the <i>extra text</i> with given index [1 .. n] becomes active \param[in] nIndex The new active text index. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred
----------------------------------------------------------------------------.

ERRCODE BCSetCharacterSpacing ( t_BarCode * pBarCode,
DOUBLE spacing )

Sets the the character spacing of the currently active text object. Positive values increment the spacing, negative values decrement it. The currently active text object can be selected by calling BCSetActiveTextIndex().

See also:
BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCGetCharacterSpacing() \param[in] pBarCode Pointer to barcode structure. \param[in] spacing The character spacing in points.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetDisplayTextA ( t_BarCode * pBarCode,
LPCSTR szText )

Sets the content of the currently active text object (usually the human readable text).

Note:
BCSetDisplayText can be used to override the human readable text which normally would contain the bar code content (only if the human readable text is currently active).
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetDisplayText(), BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Display text (reset to default: null). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

ERRCODE BCSetDisplayTextW ( t_BarCode * pBarCode,
LPCWSTR szText )

Sets the content of the currently active text object (usually the human readable text).

Note:
BCSetDisplayText can be used to override the human readable text which normally would contain the bar code content (only if the human readable text is currently active).
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetDisplayText(), BCSetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Display text (reset to default: null). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

ERRCODE BCSetFontHeight ( t_BarCode * pBarCode,
INT nHeight )

Sets the font size [points] of the currently active text object (usually the human readable text). If the font size is not set, a suitable font size is automatically calculated depending on the barcode type and barcode dimensions.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] nHeight Font height.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetFontNameA ( t_BarCode * pBarCode,
const CHAR * szName )

Sets the font of the currently active text object (usually the human readable text). The name of the font depends on the output format, for example:
\li Postscript accepts names such as Helvetica, Courier, Times-Roman, Helvetica-Bold, etc.
\li PCL accepts names and font numbers such as Helvetica (maps to 16602), Times (maps to 4101), Courier (maps to 4099) or any font number (optional: name and number can be followed by 'Bold')
Consult a Postscript or PCL reference for more information.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] szName Font name.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetFontNameW ( t_BarCode * pBarCode,
const WCHAR * szName )

Sets the font of the currently active text object (usually the human readable text). The name of the font depends on the output format, for example:
\li Postscript accepts names such as Helvetica, Courier, Times-Roman, Helvetica-Bold, etc.
\li PCL accepts names and font numbers such as Helvetica (maps to 16602), Times (maps to 4101), Courier (maps to 4099) or any font number (optional: name and number can be followed by 'Bold')
Consult a Postscript or PCL reference for more information.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex(). \param[in] pBarCode Pointer to barcode structure. \param[in] szName Font name.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetLogFont ( t_BarCode * pBarCode,
const LOGFONTA * lf )

Sets the font of the currently active text object (usually the human readable text - Windows only). Sets the font characteristics used for the human readable text and the extra texts.

Note:
Pass a LOGFONTA structure. The font size in field lfHeight must be given in Point [1/72"]. We suggest to leave the field lfWidth 0. If you have to change it, you must set the width in 1/1000 mm.
Usage for printing and BCSaveImage() \code // LOGFONTA font size = size [point] pFont->lfHeight = sizeInPoints; // unit = [point] \endcode \note The currently active text object can be selected by calling BCSetActiveTextIndex(). \par We are using 8 Byte alignment! \par Windows only For UNIX use BCSetFontName() and BCSetFontHeight() instead. \see BCGetLogFont() \param[in] pBarCode Pointer to barcode structure. \param[in] lf Pointer to LOGFONTA structure. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

ERRCODE BCSetPrintText ( t_BarCode * pBarCode,
BOOL bReadable,
BOOL bAbove )

Sets options concerning the currently active text (usually the human readable text). Determines whether the currently active text should be printed and where it should be located (below or above the bar code).

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
The parameter <i>bAbove</i> can only be applied to the human readable text and is ignored by the <i>extra text</i> objects. \see BCGetPrintText(), BCGetTextAbove(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] bReadable Print human readable text. - true: Text is printed (this is the default) - false: Text is not printed \param[in] bAbove Print human readable text above barcode. - true: Text is printed above barcode - false: Text is printed below barcode (this is the default) \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

ERRCODE BCSetTextAlignment ( t_BarCode * pBarCode,
e_BCAlign eAlign )

Sets the alignment of the currently active text object (usually the human readable text). The default is center alignment.

Note:
The currently active text object can be selected by calling BCSetActiveTextIndex().
See also:
BCGetTextAlignment(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] eAlign Text alignment enumerator.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetTextDist ( t_BarCode * pBarCode,
LONG nTextDist )

Sets the distance between the human readable text and the barcode. The default text distance is computed by TBarCode automatically, but can be overridden by calling BCSetTextDist().

Note:
This function is only supported by the human readable text but NOT by the extra texts.
See also:
BCGetTextDist(), BCSetLogFont() \param[in] pBarCode Pointer to barcode structure. \param[in] nTextDist Distance between barcode and human readable text [1/1000 mm] (-1 ... reset to default).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetTextPosition ( t_BarCode * pBarCode,
RECT * pRect,
BOOL bClipping,
BOOL bWordWrap )

Sets the position of the currently active text object. The text position is specified by a bounding rectangle. The coordinates of this rectangle are relative to the bar code's bounding rectangle.

Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex() \param[in] pBarCode Pointer to barcode structure. \param[in] pRect The bounding rectangle of the text. \param[in] bClipping Determine whether the active text should be clipped. \param[in] bWordWrap [NOT IMPLEMENTED YET!]\n Determine whether the active text should be word wrapped in the bounding rectangle. \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

ERRCODE BCSetTextRotation ( t_BarCode * pBarCode,
e_Degree eRotation )

Sets the the rotation of the currently active text object. The text rotation is defined relatively to the bar code rotation. This means that both rotation values will be added.

Note:
Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.
The currently active text object can be selected by calling BCSetActiveTextIndex(). \see BCGetActiveTextIndex(), BCSetActiveTextIndex(), BCGetTextRotation() \param[in] pBarCode Pointer to barcode structure. \param[in] eRotation The text rotation (counter-clockwise). \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.


© 2019 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Sat Jul 13 03:16:07 2019 for TBarCode Library 11 with doxygen 1.1.5