Functions | |||||
| DOUBLE | BCGetDPIHorz (t_BarCode* pBarCode) | ||||
Gets current user-defined horizontal resolution. Gets current user-defined horizontal resolution.
| |||||
| DOUBLE | BCGetDPIVert (t_BarCode* pBarCode) | ||||
Gets current user-defined vertical resolution. Gets current user-defined vertical resolution.
| |||||
| ERRCODE | BCSetDPI (t_BarCode* pBarCode, DOUBLE dDPIHorz, DOUBLE dDPIVert) | ||||
Sets user defined resolution. Sets output resolution to be used in bar code drawing / calculation functions. If not set (default), the resolution of the available device context is used (e.g. screen resolution or printer resolution). Can be used to estimate the quality of a bar code for a specific output resolution (BCGetQuality()). For other purposes this function should be used careful, because bar code dimensions can change unexpectedly.
| |||||
| BOOL | BCGetMustFit (t_BarCode* pBarCode) | ||||
Returns if the barcode must fit into the bounding rectangle. Returns currently adjusted value.
| |||||
| ERRCODE | BCSetMustFit (t_BarCode* pBarCode, BOOL bMustFit) | ||||
Checks if the barcode fits into the bounding rectangle. This property means that the barcode must fit into the bounding rectangle during drawing. Background: When specifying a fixed module width the barcode width (not the width of the bounding rectangle) changes corresponding to the amount of data characters. In addition, "MustFit" verifies if the module width is less than 1 pixel (which is treated as error in this case) If "MustFit" is activated an error may be produced due to the above reasons during the BCDraw() method.
| |||||
| BOOL | BCGetOptResolution (t_BarCode* pBarCode) | ||||
Gets current barcode optimizing behavior. Returns currently adjusted value.
| |||||
| e_SizeMode | BCGetSizeMode (const t_BarCode* pBarCode) | ||||
Retrieves the mode that determines the barcode size. If operation fails, eSizeMode_Default (= -1) is returned. \param[in] pBarCode Pointer to barcode structure.
| |||||
| ERRCODE | BCSetSizeMode (t_BarCode* pBarCode, e_SizeMode mode) | ||||
Sets the mode that determines the barcode size. \param[in,out] pBarCode Pointer to barcode structure. \param[in] mode Mode that determines barcode size.
| |||||
| LPCSTR | BCGetModWidthA (t_BarCode* pBarCode) | ||||
Gets the current module width (value is returned as string). Returns currently adjusted value.
| |||||
| LPCWSTR | BCGetModWidthW (t_BarCode* pBarCode) | ||||
Gets the current module width (value is returned as string). Returns currently adjusted value.
| |||||
| ERRCODE | BCSetModWidthA (t_BarCode* pBarCode, LPCSTR szModWidth) | ||||
Sets a fixed module width (value is passed as string [0.001 mm]). The module width is defined as the width of the smallest element (bar or space) a barcode is using. Values are specified is 1/1000 mm. If the module width is not set explicitly (default), the module width is automatically adapted to the object size (Bounding rectangle) and the amount of data to be encoded. If a value is set, the width of the modules and therefore of the whole barcode can be controlled (this may also influence the readability!). If set, the barcode width depends on the amount of data encoded in the barcode. For most barcode symbologies the module width should not fall below 0.19 mm. When drawing (Paint) the size of the bounding rectangle must be wide enough to avoid clipping.
| |||||
| ERRCODE | BCSetModWidthW (t_BarCode* pBarCode, LPCWSTR szModWidth) | ||||
Sets a fixed module width (value is passed as string [0.001 mm]). The module width is defined as the width of the smallest element (bar or space) a barcode is using. Values are specified is 1/1000 mm. If the module width is not set explicitly (default), the module width is automatically adapted to the object size (Bounding rectangle) and the amount of data to be encoded. If a value is set, the width of the modules and therefore of the whole barcode can be controlled (this may also influence the readability!). If set, the barcode width depends on the amount of data encoded in the barcode. For most barcode symbologies the module width should not fall below 0.19 mm. When drawing (Paint) the size of the bounding rectangle must be wide enough to avoid clipping.
| |||||
| DOUBLE | BCGetModWidthN (t_BarCode* pBarCode) | ||||
Gets the module width. The value is returned as numeric parameter [0.001 mm].
| |||||
| ERRCODE | BCSetModWidthN (t_BarCode* pBarCode, DOUBLE moduleWidth) | ||||
Sets a fixed module width (value is passed as numeric parameter [0.001 mm]). Sets a fixed module width passing a numeric value.
| |||||
| e_Decoder | BCGetDecoder (t_BarCode* pBarCode) | ||||
Returns the type of decoder that will be used to read this barcodes. The module width will be optimized for this type of scanner. \param[in] pBarCode Pointer to barcode structure.
| |||||
| ERRCODE | BCSetDecoder (t_BarCode* pBarCode, e_Decoder eDecoder) | ||||
Sets the type of decoder that will be used to read this barcodes. The module width will be optimized for this type of scanner. \param[in,out] pBarCode Pointer to barcode structure. \param[in] eDecoder Type of scanner.
| |||||
| DOUBLE | BCGetBarWidthReduction (t_BarCode* pBarCode) | ||||
Gets current bar-width reduction value. Returns currently adjusted value.
| |||||
| e_MUnit | BCGetBarWidthReductionUnit (t_BarCode* pBarCode) | ||||
Gets current bar-width reduction unit. Returns currently adjusted unit.
| |||||
| ERRCODE | BCSetBarWidthReduction (t_BarCode* pBarCode, DOUBLE dValue, e_MUnit eUnit) | ||||
Sets bar-width reduction (Pixel-Shaving) in given unit. Specifies the reduction of the bar-widths. The width of a bar in the barcode is reduced by the given value in the given unit. This property is useful when you have to deal with dot gain in the printing process. Example: On inkjet printers the bars appear wider than specified because the ink spreads a little bit. Same with (high) toner saturation on laser printers. You can compensate this effect by setting a bar-width reduction (also called BWR or "Pixel Shaving") to a suitable value. You have to make tests to find optimal settings because the dot gain depends on the printing method and printing surface (paper). The printed module-width is equal to the theoretically optimal module-width reduced by the reduction value.
| |||||
| LONG | BCGetQuality (t_BarCode* pBarCode, HDC hDC, RECT* pRect) | ||||
Returns drawing quality estimate of the barcode (in percent) (Windows only). TBarCode computes the expected barcode quality depending on the used output resolution. This value is a measure for the bar width aberration created by the output resolution of the device context (and therefore of the device itself). The higher the quality value - the better.
| |||||
| ERRCODE | BCSetOptResolution (t_BarCode* pBarCode, BOOL bOpt) | ||||
Optimize barcode resolution. If this feature is activated, the module width will be adapted to the resolution of the output device (or output format) by TBarCode. All bars/spaces of a barcode are aligned to the output raster in a way that only full pixels for the bar (space) widths are used. This process depends either on the DPI in the drawing DC (screen or printer driver) or the DPI property in the TBarCode Library. Using optimization the readability of the barcode is (quite) independent from the given resolution (except the resulting bar code will be too small). Using this option is recommended for bitmap formats or low output resolutions (e.g. screen or thermal transfer printers).
| |||||
| BOOL | BCGetIgnoreDpiFromDC (t_BarCode* pBarCode) | ||||
| Retrieves whether TBarCode ignores the resolution of the device context (Windows only). More... | |||||
| ERRCODE | BCSetIgnoreDpiFromDC (t_BarCode* pBarCode, BOOL bIgnore) | ||||
| Determines whether TBarCode shall ignore the resolution from the device context (Windows only). More... | |||||
|
Gets current bar-width reduction value. Returns currently adjusted value.
| LONG | Reduction in percent [0...100]. No reduction: 0 (this is the default) ----------------------------------------------------------------------------. |
|
Gets current bar-width reduction unit. Returns currently adjusted unit.
| LONG | Reduction in percent [0...100]. No reduction: 0 (this is the default) ----------------------------------------------------------------------------. |
|
Gets current user-defined horizontal resolution. Gets current user-defined horizontal resolution.
| LONG | Horizontal DPI ----------------------------------------------------------------------------. |
|
Gets current user-defined vertical resolution. Gets current user-defined vertical resolution.
| LONG | Vertical DPI ----------------------------------------------------------------------------. |
|
Returns the type of decoder that will be used to read this barcodes. The module width will be optimized for this type of scanner. \param[in] pBarCode Pointer to barcode structure.
| Type | of scanner. ----------------------------------------------------------------------. |
|
Retrieves whether TBarCode ignores the resolution of the device context (Windows only).
\param[in,out] pBarCode Pointer to barcode structure.
| TRUE | TBarCode overwrites resolution from device context with custom resolution. |
| FALSE | TBarCode uses resolution of device context. |
|
Gets the current module width (value is returned as string). Returns currently adjusted value.
| LPCSTR | String containing the module width [1/1000 mm] ----------------------------------------------------------------------------. |
|
Gets the module width. The value is returned as numeric parameter [0.001 mm].
|
Gets the current module width (value is returned as string). Returns currently adjusted value.
| LPCSTR | String containing the module width [1/1000 mm] ----------------------------------------------------------------------------. |
|
Returns if the barcode must fit into the bounding rectangle. Returns currently adjusted value.
| true | TBarCode checks if barcode fits into bounding rectangle |
| false | TBarCode does not check if barcode fits into bounding rectangle. This is the default ----------------------------------------------------------------------------. |
|
Gets current barcode optimizing behavior. Returns currently adjusted value.
| true | Optimization is enabled |
| false | Optimization is disabled. This is the default ----------------------------------------------------------------------------. |
|
Returns drawing quality estimate of the barcode (in percent) (Windows only). TBarCode computes the expected barcode quality depending on the used output resolution. This value is a measure for the bar width aberration created by the output resolution of the device context (and therefore of the device itself). The higher the quality value - the better.
| LONG | Bar-code quality [0 (unreadable)...100 (perfect)] ----------------------------------------------------------------------------. |
|
Retrieves the mode that determines the barcode size. If operation fails, eSizeMode_Default (= -1) is returned. \param[in] pBarCode Pointer to barcode structure.
|
Sets bar-width reduction (Pixel-Shaving) in given unit. Specifies the reduction of the bar-widths. The width of a bar in the barcode is reduced by the given value in the given unit. This property is useful when you have to deal with dot gain in the printing process. Example: On inkjet printers the bars appear wider than specified because the ink spreads a little bit. Same with (high) toner saturation on laser printers. You can compensate this effect by setting a bar-width reduction (also called BWR or "Pixel Shaving") to a suitable value. You have to make tests to find optimal settings because the dot gain depends on the printing method and printing surface (paper). The printed module-width is equal to the theoretically optimal module-width reduced by the reduction value.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Sets user defined resolution. Sets output resolution to be used in bar code drawing / calculation functions. If not set (default), the resolution of the available device context is used (e.g. screen resolution or printer resolution). Can be used to estimate the quality of a bar code for a specific output resolution (BCGetQuality()). For other purposes this function should be used careful, because bar code dimensions can change unexpectedly.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Sets the type of decoder that will be used to read this barcodes. The module width will be optimized for this type of scanner. \param[in,out] pBarCode Pointer to barcode structure. \param[in] eDecoder Type of scanner.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------. |
|
Determines whether TBarCode shall ignore the resolution from the device context (Windows only).
In some (rare) cases the Windows GDI device context does not contain a valid resolution. In such cases you can overwrite the resolution of the device context with a custom resolution. Use BCSetDPI() to set the custom resolution.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. |
|
Sets a fixed module width (value is passed as string [0.001 mm]). The module width is defined as the width of the smallest element (bar or space) a barcode is using. Values are specified is 1/1000 mm. If the module width is not set explicitly (default), the module width is automatically adapted to the object size (Bounding rectangle) and the amount of data to be encoded. If a value is set, the width of the modules and therefore of the whole barcode can be controlled (this may also influence the readability!). If set, the barcode width depends on the amount of data encoded in the barcode. For most barcode symbologies the module width should not fall below 0.19 mm. When drawing (Paint) the size of the bounding rectangle must be wide enough to avoid clipping.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Sets a fixed module width (value is passed as numeric parameter [0.001 mm]). Sets a fixed module width passing a numeric value.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Sets a fixed module width (value is passed as string [0.001 mm]). The module width is defined as the width of the smallest element (bar or space) a barcode is using. Values are specified is 1/1000 mm. If the module width is not set explicitly (default), the module width is automatically adapted to the object size (Bounding rectangle) and the amount of data to be encoded. If a value is set, the width of the modules and therefore of the whole barcode can be controlled (this may also influence the readability!). If set, the barcode width depends on the amount of data encoded in the barcode. For most barcode symbologies the module width should not fall below 0.19 mm. When drawing (Paint) the size of the bounding rectangle must be wide enough to avoid clipping.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Checks if the barcode fits into the bounding rectangle. This property means that the barcode must fit into the bounding rectangle during drawing. Background: When specifying a fixed module width the barcode width (not the width of the bounding rectangle) changes corresponding to the amount of data characters. In addition, "MustFit" verifies if the module width is less than 1 pixel (which is treated as error in this case) If "MustFit" is activated an error may be produced due to the above reasons during the BCDraw() method.
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Optimize barcode resolution. If this feature is activated, the module width will be adapted to the resolution of the output device (or output format) by TBarCode. All bars/spaces of a barcode are aligned to the output raster in a way that only full pixels for the bar (space) widths are used. This process depends either on the DPI in the drawing DC (screen or printer driver) or the DPI property in the TBarCode Library. Using optimization the readability of the barcode is (quite) independent from the given resolution (except the resulting bar code will be too small). Using this option is recommended for bitmap formats or low output resolutions (e.g. screen or thermal transfer printers).
| ERRCODE | ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------. |
|
Sets the mode that determines the barcode size. \param[in,out] pBarCode Pointer to barcode structure. \param[in] mode Mode that determines barcode size.
| 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 |