Tabnine Logo
PApplet.savePath
Code IndexAdd Tabnine to your IDE (free)

How to use
savePath
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.savePath (Showing top 10 results out of 315)

origin: org.processing/core

/**
 * Identical to savePath(), but returns a File object.
 */
public File saveFile(String where) {
 return new File(savePath(where));
}
origin: ajavamind/Processing-Cardboard

/**
 * Identical to savePath(), but returns a File object.
 */
public File saveFile(String where) {
  return new File(savePath(where));
}
origin: ajavamind/Processing-Cardboard

/**
 * Intercepts any relative paths to make them absolute (relative
 * to the sketch folder) before passing to save() in PImage.
 * (Changed in 0100)
 */
public void save(String filename) {
  g.save(savePath(filename));
}
origin: org.processing/core

/**
 */
public void saveFrame() {
 try {
  g.save(savePath("screen-" + nf(frameCount, 4) + ".tif"));
 } catch (SecurityException se) {
  System.err.println("Can't use saveFrame() when running in a browser, " +
            "unless using a signed applet.");
 }
}
origin: org.processing/core

/**
 * ( begin auto-generated from save.xml )
 *
 * Saves an image from the display window. Images are saved in TIFF, TARGA,
 * JPEG, and PNG format depending on the extension within the
 * <b>filename</b> parameter. For example, "image.tif" will have a TIFF
 * image and "image.png" will save a PNG image. If no extension is included
 * in the filename, the image will save in TIFF format and <b>.tif</b> will
 * be added to the name. These files are saved to the sketch's folder,
 * which may be opened by selecting "Show sketch folder" from the "Sketch"
 * menu. It is not possible to use <b>save()</b> while running the program
 * in a web browser.
 * <br/> images saved from the main drawing window will be opaque. To save
 * images without a background, use <b>createGraphics()</b>.
 *
 * ( end auto-generated )
 * @webref output:image
 * @param filename any sequence of letters and numbers
 * @see PApplet#saveFrame()
 * @see PApplet#createGraphics(int, int, String)
 */
public void save(String filename) {
 g.save(savePath(filename));
}
origin: ajavamind/Processing-Cardboard

/**
 * Grab an image of what's currently in the drawing area and save it
 * as a .tif or .tga file.
 * <p/>
 * Best used just before endDraw() at the end of your draw().
 * This can only create .tif or .tga images, so if neither extension
 * is specified it defaults to writing a tiff and adds a .tif suffix.
 */
public void saveFrame() {
  try {
    g.save(savePath("screen-" + nf(frameCount, 4) + ".tif"));
  } catch (SecurityException se) {
    System.err.println("Can't use saveFrame() when running in a browser, " +
        "unless using a signed applet.");
  }
}
origin: ajavamind/Processing-Cardboard

/**
 * Save the current frame as a .tif or .tga image.
 * <p/>
 * The String passed in can contain a series of # signs
 * that will be replaced with the screengrab number.
 * <PRE>
 * i.e. saveFrame("blah-####.tif");
 * // saves a numbered tiff image, replacing the
 * // #### signs with zeros and the frame number </PRE>
 */
public void saveFrame(String what) {
  try {
    g.save(savePath(insertFrame(what)));
  } catch (SecurityException se) {
    System.err.println("Can't use saveFrame() when running in a browser, " +
        "unless using a signed applet.");
  }
}
origin: org.processing/core

 g.save(savePath(insertFrame(filename)));
} catch (SecurityException se) {
 System.err.println("Can't use saveFrame() when running in a browser, " +
origin: org.processing/core

pg.setPrimary(primary);
if (path != null) {
 pg.setPath(savePath(path));
origin: org.processing/core

filename = parent.savePath(filename);
processing.corePAppletsavePath

Javadoc

Returns a path inside the applet folder to save to. Like sketchPath(), but creates any in-between folders so that things save properly.

All saveXxxx() functions use the path to the sketch folder, rather than its data folder. Once exported, the data folder will be found inside the jar file of the exported application or applet. In this case, it's not possible to save data into the jar file, because it will often be running from a server, or marked in-use if running from a local file system. With this in mind, saving to the data path doesn't make sense anyway. If you know you're running locally, and want to save to the data folder, use saveXxxx("data/blah.dat").

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JList (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now