View previous topic :: View next topic |
Author |
Message |
Anupriya
Joined: 27 Mar 2009 Posts: 11
|
Posted: Thu May 28, 2009 7:16 pm Post subject: printer to graphic surface using%pl |
|
|
hi,
i have created a graphic surface using %pl, i am unable to attach a printer to that graphics region.
i am aware that it is possible with %`gr by setting a handle to it,but i guess %pl does not have this option.
any help is much appreciated.
thank you. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri May 29, 2009 7:36 am Post subject: |
|
|
If you just wanted to do this occasionally then a quick and nasty way would be to copy the screen to the clipboard (using the Print Screen key on the keyboard) and then paste this into Microsoft Paint.
If no one can think of a better way, I will take a look at the ClearWin+ code sometime next week. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jun 02, 2009 5:59 pm Post subject: |
|
|
As a start you could use the following sample in order to put the image on the clipboard as a metafile.
Code: | WINAPP
INTEGER ctrl,start_cb,winio@
EXTERNAL start_cb
INTEGER N,i
PARAMETER(N=11)
REAL*8 x(N),y(N)
DO i=1,N
x(i)=i-1
y(i)=x(i)**2
ENDDO
ctrl=999
i=winio@('%`pl[x_array]&',400,250,N,x,y,ctrl)
i=winio@('%sc', start_cb)
END
INTEGER FUNCTION start_cb()
INCLUDE <windows.ins>
INTEGER ctrl
ctrl = 999
CALL SIMPLEPLOT_TO_CLIPBOARD@(ctrl)
start_cb = 1
END |
Then it might be possible to copy from the clipboard into a %gr region say, perhaps using play_clipboard_metafile@.
Last edited by PaulLaidler on Wed Jun 03, 2009 2:40 pm; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 03, 2009 2:36 pm Post subject: |
|
|
There is another undocumented routine (as well as simpleplot_to_clipboard@). It is the subroutine simpleplot_to_metafile@.
It takes two arguments. An integer handle, corresponding to the value used with the grave accent on %pl, followed by a character variable giving the name of the file. |
|
Back to top |
|
|
|