<< Click to Display Table of Contents > Bitmaps |
There are currently two ways to perform bitmap marking: legacy mode with DevicePixelLine and raster mode with RasterPixelLine, which is only available with USC-2.
When using DevicePixelLine, marking is performed with the currently set marking speed, and the output frequency results from the pixel vector length. You have to adjust the speed yourself if a particular pixel vector would result in an illegal frequency setting.
Steps for DevicePixelLine:
•position the scanner at the start of a line
•output the line with DevicePixelLine
•repeat until finished
In raster mode, marking of a bitmap is encapsulated in raster start and raster end calls, similar to stream start and end. Each line is marked with RasterPixelLine, but movement is performed by the SAM library. In contrast to legacy mode, raster mode takes the pixel vector length and a user specified pixel period and calculates the corresponding marking speed itself.
Steps for RasterPixelLine:
•enable scComStandardDeviceStyleFlagEnablePixelOutput
•signal bitmap start and pass parameters with ScSCIRasterStart or ScSetDeviceData
•output all lines
•signal bitmap end
Raster start is signaled using a sc_com_raster_info structure that is passed to the ScSetDeviceData function with scComStandardDeviceDataIDRasterStart ID. The direct dll interface provides the function ScSCIStartRaster that offers the same functionality. The structure contains the following members:
Member |
Type |
Description |
---|---|---|
m_version |
long |
struct version, set to 1 |
m_origin_x |
double |
start point x coordinate |
m_origin_y |
double |
start point y coordinate |
m_dir_x |
double |
x component of direction vector |
m_dir_y |
double |
y component of direction vector |
m_pixel_step |
double |
width of one pixel |
m_line_step |
double |
distance between bitmap lines |
m_acceleration_time |
double |
time until scanner achieves desired speed |
m_deceleration_time |
double |
time to compensate tracking offset on line end |
m_line_offset |
double |
time offset to compensate acceleration_time and tracking offset |
m_jump_speed |
double |
speed used when jumping between lines |
m_wait_delay_0 |
double |
delay after jump |
m_limit_value |
double |
value used to determine if a pixel is blank - currently unused |
m_mode_flags |
long |
0, or any combination of scComStandardDeviceRasterModeFlagBiDir and scComStandardDeviceRasterModeFlagJumpOverBlankPixels |
Table 5: Bitmap RasterPixelLine members
m_acceleration_time - m_line_offset should equal the tracking offset of your scanner.
The following image illustrates the various parameters. The left part shows the theoretical output with no acceleration/deceleration and offset, the right part shows the influence of these parameters. Both parts assume scComStandardDeviceRasterModeFlagBiDir is enabled.
Figure 2: Illustration of Bitmap RasterPixelLine