PLOT BITMAP IN MEMBLOCK ptr,x,y,width,height < DWORD,integer,integer,integer,integer >
PLOT BITMAP IN MEMORYBLOCK sends the bitmap in the memory block pointed at by pointer to the printer. TO USE THIS COMMAND YOU MUST PASS A POINTER TO A VALID MEMORY BLOCK CONTAINING A DARK BASIC BITMAP STRUCTURE. If you pass a bad pointer or an incorrectly formatted memory block to this function you may crash your computer.
Using this command it is possible to print any graphic loaded with LOAD BITMAP or LOAD IMAGE. First you must create a memory block using the dark basic commands MAKE MEMBLOCK FROM BITMAP or MAKE MEMBLOCK FROM IMAGE. You must then obtain a pointer using the dark basic command GET MEMBLOCK POINTER. It is this pointer which you pass to the function in the pointer variable. When you have finished with your memory block remember to delete it using the DELETE MEMBLOCK command.
If you are not an advanced programmer I have included a helper function in DPIncludes file called BitMap_To_Printer.
Example
function BitMap_To_Printer(BitMapNo As Integer,x As integer,y as integer, width as integer, height as integer)
mem_no as integer
ptr as DWORD
mem_no = 1
assigned as integer
repeat
assigned = memblock exist(mem_no)
inc mem_no,1
until assigned = false or mem_no = max_int
if assigned = false
dec mem_no,1
MAKE MEMBLOCK FROM BITMAP mem_no,BitMapNo
ptr = GET MEMBLOCK PTR(mem_no)
PLOT BITMAP IN MEMBLOCK ptr,x,y,width,height
DELETE MEMBLOCK mem_no
endif
endfunction