gdiapi.cpp File Reference

Public API functions to draw barcodes. More...


Functions

BOOL BCGetDrawMode (t_BarCode* pBarCode)
 Gets current method for drawing bars (Windows only). Returns currently adjusted value.
See also:
BCSetDrawMode() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Best performance method is used (drawing filled rectangles)
false   High quality method is used. This is the default. ----------------------------------------------------------------------------.


e_DrawMode BCGetDrawModeExt (t_BarCode* pBarCode)
 Gets current method for drawing bars (Windows only). Returns currently adjusted value.
See also:
BCSetDrawModeExt() \param[in] pBarCode Pointer to barcode structure.
Returns:
Current draw mode. ----------------------------------------------------------------------------.


ERRCODE BCSetDrawMode (t_BarCode* pBarCode, BOOL bUseGDIRect)
 Selects the method for drawing bars (Windows only). Sets the GDI drawing-method used for painting the bars. TBarCode normally draw bars in high quality mode that bases on specialized GDI-functionality. Some printer drivers do not handle this method correctly (invisible, too short bars or wrong clipping). If this happens activate the conventional method (bars are drawn as filled rectangles). The conventional method may result in decreased barcode quality for devices with low output resolution.
See also:
BCGetDrawMode() \param[in] pBarCode Pointer to barcode structure. \param[in] bUseGDIRect Use GDI DrawRect for drawing. - true: Method with the best performance is used (filled rectangles) - false: Method with highest quality method is used. This is the default.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSetDrawModeExt (t_BarCode* pBarCode, e_DrawMode eMode)
 Selects the method for drawing bars (Windows only). Sets the GDI drawing-method used for painting the bars.
See also:
BCSetDrawMode(), BCGetDrawModeExt() \param[in] pBarCode Pointer to barcode structure. \param[in] eMode Drawing Mode.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSetDCConversion (t_BarCode* pBarCode, BOOL bConvertDC)
 Activates or deactivates conversion of Windows GDI drawing context (DC). By default all DCs are internally converted, so that logical units are himetric (1/100 mm). This conversion can be turned off if the DC given to the drawing routines already uses himetrics as logical units. Or you can turn off this conversion to use a DC with custom scaling. \param[in] pBarCode Pointer to barcode structure. \param[in] bConvertDC TRUE if DC should be converted. FALSE if conversion should be turned off.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


BOOL BCGetDCConversion (t_BarCode* pBarCode)
 Returns TRUE if Windows GDI device context (DC) conversion is activated. \param[in] pBarCode Pointer to barcode structure.
Return values:
TRUE   DC conversion is activated. (This is the default setting).
FALSE   DC conversion is deactivated. ----------------------------------------------------------------------------.


ERRCODE BCDraw (t_BarCode* pBarCode, HDC hDC, RECT* pRect)
 Draws barcode onto the given Windows device context. Draws the barcode onto the given device context. The coordinates of the bounding rectangle defines the barcode dimensions. The coordinates passed in pRect are interpreted in the current mapping mode of the device context. No special coordinate mapping is performed.
See also:
BCDrawCB() for custom drawing functionality.
Note:
WINDOWS only \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle. \param[in] pRect Bounding rectangle.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.



Detailed Description

Public API functions to draw barcodes.

Required include file: "tbarcode.h"

Author(s):
TEC-IT Datenverarbeitung GmbH
Wagnerstr. 6, 4400 Steyr, AUSTRIA/EUROPE
https://www.tec-it.com
Copyright© by TEC-IT Datenverarbeitung GmbH


Function Documentation

ERRCODE BCDraw ( t_BarCode * pBarCode,
HDC hDC,
RECT * pRect )

Draws barcode onto the given Windows device context. Draws the barcode onto the given device context. The coordinates of the bounding rectangle defines the barcode dimensions. The coordinates passed in pRect are interpreted in the current mapping mode of the device context. No special coordinate mapping is performed.

See also:
BCDrawCB() for custom drawing functionality.
Note:
WINDOWS only \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle. \param[in] pRect Bounding rectangle.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

BOOL BCGetDCConversion ( t_BarCode * pBarCode )

Returns TRUE if Windows GDI device context (DC) conversion is activated. \param[in] pBarCode Pointer to barcode structure.

Return values:
TRUE   DC conversion is activated. (This is the default setting).
FALSE   DC conversion is deactivated. ----------------------------------------------------------------------------.

BOOL BCGetDrawMode ( t_BarCode * pBarCode )

Gets current method for drawing bars (Windows only). Returns currently adjusted value.

See also:
BCSetDrawMode() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Best performance method is used (drawing filled rectangles)
false   High quality method is used. This is the default. ----------------------------------------------------------------------------.

e_DrawMode BCGetDrawModeExt ( t_BarCode * pBarCode )

Gets current method for drawing bars (Windows only). Returns currently adjusted value.

See also:
BCSetDrawModeExt() \param[in] pBarCode Pointer to barcode structure.
Returns:
Current draw mode. ----------------------------------------------------------------------------.

ERRCODE BCSetDCConversion ( t_BarCode * pBarCode,
BOOL bConvertDC )

Activates or deactivates conversion of Windows GDI drawing context (DC). By default all DCs are internally converted, so that logical units are himetric (1/100 mm). This conversion can be turned off if the DC given to the drawing routines already uses himetrics as logical units. Or you can turn off this conversion to use a DC with custom scaling. \param[in] pBarCode Pointer to barcode structure. \param[in] bConvertDC TRUE if DC should be converted. FALSE if conversion should be turned off.

Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetDrawMode ( t_BarCode * pBarCode,
BOOL bUseGDIRect )

Selects the method for drawing bars (Windows only). Sets the GDI drawing-method used for painting the bars. TBarCode normally draw bars in high quality mode that bases on specialized GDI-functionality. Some printer drivers do not handle this method correctly (invisible, too short bars or wrong clipping). If this happens activate the conventional method (bars are drawn as filled rectangles). The conventional method may result in decreased barcode quality for devices with low output resolution.

See also:
BCGetDrawMode() \param[in] pBarCode Pointer to barcode structure. \param[in] bUseGDIRect Use GDI DrawRect for drawing. - true: Method with the best performance is used (filled rectangles) - false: Method with highest quality method is used. This is the default.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSetDrawModeExt ( t_BarCode * pBarCode,
e_DrawMode eMode )

Selects the method for drawing bars (Windows only). Sets the GDI drawing-method used for painting the bars.

See also:
BCSetDrawMode(), BCGetDrawModeExt() \param[in] pBarCode Pointer to barcode structure. \param[in] eMode Drawing Mode.
Return values:
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:06 2019 for TBarCode Library 11 with doxygen 1.1.5