How do you plot a bitmap?

How do you plot a bitmap?

I have displayed a bitmap on the screen using the StretchBlt command.
I now want to send the bitmap to an HP plotter using HP RTL commands. Has anyone done this and has an example of how to do it?
I have sent lines to the HP plotter using SP,PU & PD HP-GL commands in the past

Thanks,
David

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Mhm, I'm not quite familiar with that plotter stuff, but GDI is supposed to encapsulate HP-GL if appropriate driver is present. The printing routines (GDI) I wrote once did work flawlessly on HP and Epson plotters too.

Take a look at XFTGDI. Does it work on a plotter? (Take care not to specify large paper format - if you forget, send me the paper so I can use it as an ad poster :-))

Jugoslav
www.xeffort.com

Thanks,
I looked at your code and documentation - but couldn't see anything about plotting a bitmap.
I want to write to a file using HP commands, then send the file to the plotter.

Regards,
David

Yes, my point was that you can treat the plotter as a printer and do a StretchBlt to its DC (XPlaceBitmap and XBitCopy are wrappers around StretchBlt). However, if you really have to write to file using HP-GL, well... you're on your own.

Jugoslav

Jugoslav
www.xeffort.com

Thanks,
Looks as if I'm on my own, unless anyone else can help.
I wanted to use HPGL commands as that is how I plot my vectors.
I could change all my plotting... but not yet.
Regards,
David

You may be able to OPEN the plotter as a file with FILE='network_address', where network_address is in the form serverprinter (assuming this is a Windows network). After that, use WRITEs or PRINTs to send your HPGL commands to the plotter one at a time. CLOSE the "file" once you're done plotting.

I seem to recall doing something similar once, but it's been a while.

Mike

If your program uses a graphics language such as HP-GL, look at Fortran_WinprintDirect.f90

Steve

Steve - Intel Developer Support

Steve,
Thanks for the reply.
But how do I use this to plot a bitmap.
Do you have an example of the call.
The first parameter is a unit - a file - this cannot be the bitmap?

Regards,
David

You said that in the past you sent HP-GL commands to the plotter. Well, I told you how you can send HP-GL commands - you write them to a file and then call the routine in Fortran_WinPrintDirect.

If you want to render a bitmap to a page and print that, I don't have ready code for that purpose. If you look at the Win32 SDK documentation on using printers, there is a C sample that prints a bitmap - if you study that and look at Fortran_WinPrint, you should be able to work it out.

Steve

Steve - Intel Developer Support

Sending the file to the plotter is not a problem.
The problem is creating the HP-GL file from the Bitmap.

Regards,
David

Just dropping in to say I have been greatly disappointed with the response you were getting from Intel. I have the same need and I have been unable to get the info I need. I want to write files in HP-RTL to go direct to large format HP DesignJet plotters. I typically have 42 inch by severa feet plots. HP and Intel have been no help.

If you get this reply, let me know.

Ralph Baird
Houston Texas ralph@bairdpetro.com

Ralph,

I'm sorry to hear you are disappointed in Intel's support, but our technical support does not extend to tutorials on programming.

I don't know HP-RTL, but if it is anything like HP-GL, in that it is a series of text commands, the Fortran-WinPrintDirect.f90 example code should do what you want.

Steve - Intel Developer Support

The Link Fortran_WinprintDirect.f90is not true. Please post the correct one.

How do you create the bitmap? If you draw it on a device context, then you must use drawing commands.
Why not, for each drawing command, duplicate its equivalent in HP-GL commands, or wahtever,at the same time and copy them to a file?

Or how about trying SPLOT, see here http://www.swplot.com/splot.htm?
(P.S. I have no experience of it, but it came up when I used Google to search fro 'HP RTL'.

Google is your friend:
Fortran_WinprintDirect.f90

Jugoslav
www.xeffort.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today