File: PetscDrawSetSave.html

package info (click to toggle)
petsc 3.7.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 163,864 kB
  • ctags: 618,438
  • sloc: ansic: 515,133; python: 29,793; makefile: 20,458; fortran: 18,998; cpp: 6,515; f90: 3,914; sh: 1,012; xml: 621; objc: 445; csh: 240; java: 13
file content (52 lines) | stat: -rw-r--r-- 3,563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Draw/PetscDrawSetSave.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscDrawSetSave</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
   <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/Draw/PetscDrawSetSave.html "><small>Report Typos and Errors</small></a></div>
<A NAME="PetscDrawSetSave"><H1>PetscDrawSetSave</H1></A>
Saves images produced in a <A HREF="../Draw/PetscDraw.html#PetscDraw">PetscDraw</A> into a file 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdraw.h" 
PetscErrorCode  PetscDrawSetSave(PetscDraw draw,const char filename[])
</PRE>
Collective on <A HREF="../Draw/PetscDraw.html#PetscDraw">PetscDraw</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>draw      </B></TD><TD>- the graphics context
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>filename  </B></TD><TD>- name of the file, if .ext then uses name of draw object plus .ext using .ext to determine the image type
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Options Database Command</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-draw_save &lt;filename&gt;  </B></TD><TD>- filename could be name.ext or .ext (where .ext determines the type of graphics file to save, for example .png)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-draw_save_final_image [optional filename] </B></TD><TD>- saves the final image displayed in a window
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-draw_save_single_file </B></TD><TD>- saves each new image in the same file, normally each new image is saved in a new file with filename/filename_%d.ext
</TD></TR></TABLE>
<P>

<P>
<P>
Notes: You should call this BEFORE creating your image and calling <A HREF="../Draw/PetscDrawSave.html#PetscDrawSave">PetscDrawSave</A>().
The supported image types are .png, .gif, .jpg, and .ppm (PETSc chooses the default in that order).
Support for .png images requires configure --with-libpng.
Support for .gif images requires configure --with-giflib.
Support for .jpg images requires configure --with-libjpeg.
Support for .ppm images is built-in. The PPM format has no compression (640x480 pixels ~ 900 KiB).
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../Draw/PetscDrawSetFromOptions.html#PetscDrawSetFromOptions">PetscDrawSetFromOptions</A>(), <A HREF="../Draw/PetscDrawCreate.html#PetscDrawCreate">PetscDrawCreate</A>(), <A HREF="../Draw/PetscDrawDestroy.html#PetscDrawDestroy">PetscDrawDestroy</A>(), <A HREF="../Draw/PetscDrawSetSaveFinalImage.html#PetscDrawSetSaveFinalImage">PetscDrawSetSaveFinalImage</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/classes/draw/interface/dsave.c.html#PetscDrawSetSave">src/sys/classes/draw/interface/dsave.c</A>
<BR><A HREF="./index.html">Index of all Draw routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>