forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

printer to graphic surface using%pl

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Anupriya



Joined: 27 Mar 2009
Posts: 11

PostPosted: Thu May 28, 2009 7:16 pm    Post subject: printer to graphic surface using%pl Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Fri May 29, 2009 7:36 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Jun 02, 2009 5:59 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Wed Jun 03, 2009 2:36 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group