wosl
Joined: 31 Jan 2008 Posts: 30
|
Posted: Sat May 03, 2008 4:49 pm Post subject: |
|
|
Hi Paul!
The function USE_OLD_PRINT_DIALOG@(1) doesn't make it better, no change at all. In addition, I tested the output on my (black/white) HP laserprinter. The output color is monochrome instead of a gray shading. I couldn't test it on a color printer so far.
It seems to me that I've made a mistake but could get it now. I hope somebody has an idea. Therefore, here is a piece of code ... it generates images in different colors. The screen output looks fine, the printer output not:
WoSl
PS: Sorry for the lengthy code ...
Code: |
winapp
program PDFPrint
implicit none
include <windows.ins>
external DrawG,PrintG
integer i
integer ihnd_print,ihnd_grap,ictrl
integer g_width,g_depth
common /handle/ihnd_print,ihnd_grap,ictrl
common /screen/g_width,g_depth
data ihnd_print,ihnd_grap,ictrl /1,2,3/
g_width=0.85*clearwin_info@ ('SCREEN_WIDTH')
g_depth=0.85*clearwin_info@ ('SCREEN_DEPTH')
i=winio@ ('%ww[no_border]%ca[PDFPrint]&')
i=winio@ ('%mn[&Exit]&','EXIT')
i=winio@ ('%mn[&Draw]&',DrawG)
i=winio@ ('%mn[&Print]&',PrintG)
i=winio@ ('%pv%`gr[box_selection,'//
* 'rgb_colours,full_mouse_input]&',
* g_width,g_depth, ihnd_grap)
i=winio@ ('%lw',ictrl)
end
integer function DrawG ()
c Call Back Function: Draw Graphics
implicit none
include <windows.ins>
integer i
integer ihnd_print,ihnd_grap,ictrl
common /handle/ihnd_print,ihnd_grap,ictrl
i=select_graphics_object@ (ihnd_grap)
call draw ()
DrawG=1
return
end
integer function PrintG ()
c Call Back Function: Print Graphics
implicit none
include <windows.ins>
integer i
integer ihnd_print,ihnd_grap,ictrl
common /handle/ihnd_print,ihnd_grap,ictrl
cc i=USE_OLD_PRINT_DIALOG@(1)
i=open_printer@ (ihnd_print)
if (i.gt.0) then
call draw()
i=close_printer@ (0L)
end if
PrintG=1
return
end
subroutine Draw ()
implicit none
include <windows.ins>
integer ir,ig,ib,iy,i,ix
integer g_width,g_depth
common /screen/g_width,g_depth
c Draw color images
iy=10
ix=50
i=0
do ir=5,255,50
do ig=5,255,50
do ib=5,255,50
iy=iy+10
i=i+1
if (iy+10.gt.g_depth) then
iy=20
ix=ix+50
end if
call draw_filled_rectangle@ (ix,iy,ix+50,iy+10,rgb@(ir,ig,ib))
end do
end do
end do
c draw gray scaled images
iy=10
ix=300
i=0
do ir=5,255,10
iy=iy+10
i=i+1
if (iy+10.gt.g_depth) then
iy=20
ix=ix+300
end if
call draw_filled_rectangle@ (ix,iy,ix+50,iy+10,rgb@(ir,ir,ir))
end do
return
end
|
|
|