replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - saving from simpleplot
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 

saving from simpleplot

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
acp693



Joined: 04 Sep 2006
Posts: 56

PostPosted: Thu Feb 26, 2009 11:12 am    Post subject: saving from simpleplot Reply with quote

Hello,

Does anybody know how to save a simpleplot pic to a file as a .gif or .bmp?

I found PICSAV in the simpleplot manual, but this just saves sizes, positions and scales of the current pic as an integer expression.

Many thanks

Albert
Back to top
View user's profile Send private message
acp693



Joined: 04 Sep 2006
Posts: 56

PostPosted: Thu Feb 26, 2009 7:13 pm    Post subject: Reply with quote

As a test program I came up with this. It saves a bitmap to TestBmp.bmp

However a small dialogue box flashes up briefly when running the program. Is there a way to suppress this?

Code:
winapp

program Save_Bmp

INCLUDE 'CLEARWIN.INS'
      
INTEGER NPTS, NELEM
PARAMETER(NPTS=4, NELEM= 2)
INTEGER ELEMS(3,2)
REAL X(NPTS), Y(NPTS), Z(NPTS)
REAL XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX, UMIN, UMAX

DATA X/1.0,2.0,1.0,2.0/
DATA Y/1.0,1.0,2.0,2.0/
DATA Z/1.0,2.0,2.0,1.0/

data ELEMS(1,:)/1,1,/ ! each element described by 3 nodes
data ELEMS(2,:)/2,3/ ! in each col of ELEMS
data ELEMS(3,:)/4,4/

CALL OWNFIL (4, 2, 0, 'C:\\TestBmp.bmp')
CALL DEVNO(5365)

CALL VSEDGV(1) ! Draw element boundaries
CALL LIMEXC(X, NPTS, XMIN, XMAX) ! Find range of x...
CALL LIMEXC(Y, NPTS, YMIN, YMAX) ! ... and Y ...
CALL LIMEXC(Z, NPTS, ZMIN, ZMAX) ! ...
CALL LIMEXC(Z, NPTS, UMIN, UMAX) ! Draw contours over range ...
CALL VS3DLM(XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX)
CALL PAGMRG(2.0, 2.0, 1.0, 0.0) ! Picture Margin
CALL VSNEW
CALL VSUTOC(UMIN, UMAX, 8, 14) ! ... of Z
CALL VSZu(X, Y, Z, Z,NPTS, ELEMS, 3, NELEM) ! Draw Z
CALL VSOUT
CALL ENDPLT

end program Save_Bmp
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri Feb 27, 2009 4:44 am    Post subject: Reply with quote

I dump the active selected clearwin+ screen as a .pcx or .jpg file, using the clearwin+ calls :-

call write_graphics_to_pcx@ (pcx_file_name, error_pcx)
or
error_jpg = export_image@ (jpg_file_name)

These can be opened with photoeditor or similar and then saved as bitmaps. I think there are routines to dump as .bmp , but these formats produce much larger graphics files for my style of graphics.

I hope this helps.
Back to top
View user's profile Send private message
acp693



Joined: 04 Sep 2006
Posts: 56

PostPosted: Fri Feb 27, 2009 9:14 am    Post subject: Reply with quote

Thanks John, I will look at those, as the simpleplot routines can only save as .bmp or .wmf, which are a little bit limiting.

Regards

Albert
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Wed Mar 04, 2009 2:21 pm    Post subject: Reply with quote

I've been following your troubles with simpleplot. Is the issue really using simpleplot, or is it that you want to contour a field value over a mesh of triangular elements (with values at the nodes), and get a hard copy of that? If the latter, I can give you a routine to do the contouring ...

If it is the latter, then send me a private message with an address to send it to.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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