Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Create Bitmap

christian_rackl
Beginner
677 Views
Hello again everybody,
I need further help with my VF Console Application.
My task is to create an image file.
The user entered values should be printed to a diagram for checking and documentation issues.
I have no idea to do that!

Thanks to everybody for helping in advance
0 Kudos
6 Replies
ingo_berg
Beginner
677 Views
Natively Fortran does support neither drawing of any kind nor exporting bitmaps. What you want to achieve and how depends on your operating system. Your best bet is search for a grafix library and use it for both the drawing and the exporting.

Alternatively you could dump the data and use any other tool that has a batch mode for the visualization (tecplot, gnuplot). They will create the plots for you and offer a variety of options for exporting.
Generate the necessary scripts for these programs from your fortran application and call them via the system command. Doing it like that is almost any time much easier.
0 Kudos
anthonyrichards
New Contributor III
677 Views
You need to give a lot more information. Like, how do you envisage creating your image? what does your image consist of? A Drawing, a graph, text, both?
Since you have VF, you could try vreating a QuickWin project which should quickly allow you to draw to a QuickWin window. Saveimage function allows you to easily save a window as a bitmap.
0 Kudos
christian_rackl
Beginner
677 Views
I want to draw a Haigh diagram (if you are familiar with fatigue things)

Its only a couple of lines with some text for the axis

What would i have to change for a QuickWin program?
What are the differences to a console application?

Thanks
0 Kudos
aliho
Beginner
677 Views
As far as I know, nothing forbid using GDI functions on a memory DC in a console application.
So, create a bitmap and a memory DC and associate the bitmap to the DC.
Draw your graphs using GDI functions and finally write the bitmap in a file.
0 Kudos
sabalan
New Contributor I
677 Views
... Or look at, and use,the sample program Scigragh whichfollows CVF.
Sabalan.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
677 Views
See also this thread.
Jugoslav
0 Kudos
Reply