Module javafx.graphics
Package javafx.scene

# Class SnapshotParameters

java.lang.Object
javafx.scene.SnapshotParameters

    public class SnapshotParameters
    extends Object

Parameters used to specify the rendering attributes for Node snapshot.

Since:
  JavaFX 2.2

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `SnapshotParameters()` | Constructs a new SnapshotParameters object with default values for all rendering attributes.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `Camera` | `getCamera()` | Gets the current camera.
  `Paint` | `getFill()` | Gets the current fill.
  `Transform` | `getTransform()` | Gets the current transform.
  `Rectangle2D` | `getViewport()` | Gets the current viewport
  `boolean` | `isDepthBuffer()` | Gets the current depthBuffer flag.
  `void` | `setCamera​(Camera camera)` | Sets the camera to the specified value.
  `void` | `setDepthBuffer​(boolean depthBuffer)` | Sets the depthBuffer flag to the specified value.
  `void` | `setFill​(Paint fill)` | Sets the fill to the specified value.
  `void` | `setTransform​(Transform transform)` | Sets the transform to the specified value.
  `void` | `setViewport​(Rectangle2D viewport)` | Sets the viewport used for rendering.

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SnapshotParameters

    public SnapshotParameters()
    Constructs a new SnapshotParameters object with default values for all rendering attributes.

- ## Method Details

  - ### isDepthBuffer

    public boolean isDepthBuffer()
    Gets the current depthBuffer flag.
    Returns:
      the depthBuffer flag

  - ### setDepthBuffer

    public void setDepthBuffer​(boolean depthBuffer)
    Sets the depthBuffer flag to the specified value. The default value is false. Note that this is a conditional feature. See `ConditionalFeature.SCENE3D`
    Parameters:
      `depthBuffer` - the depthBuffer to set

  - ### getCamera

    public Camera getCamera()
    Gets the current camera.
    Returns:
      the camera

  - ### setCamera

    public void setCamera​(Camera camera)
    Sets the camera to the specified value. The default value is null, which means a ParallelCamera will be used.
    Parameters:
      `camera` - the camera to set

  - ### getTransform

    public Transform getTransform()
    Gets the current transform.
    Returns:
      the transform

  - ### setTransform

    public void setTransform​(Transform transform)
    Sets the transform to the specified value. This transform is applied to the node being rendered before any local transforms are applied. A value of null indicates that the identity transform should be used. The default value is null.
    Parameters:
      `transform` - the transform to set

  - ### getFill

    public Paint getFill()
    Gets the current fill.
    Returns:
      the fill

  - ### setFill

    public void setFill​(Paint fill)
    Sets the fill to the specified value. This is used to fill the entire image being rendered prior to rendering the node. A value of null indicates that the color white should be used for the fill. The default value is null.
    Parameters:
      `fill` - the fill to set

  - ### getViewport

    public Rectangle2D getViewport()
    Gets the current viewport
    Returns:
      the viewport

  - ### setViewport

    public void setViewport​(Rectangle2D viewport)
    Sets the viewport used for rendering. The viewport is specified in the parent coordinate system of the node being rendered. It is not transformed by the transform of this SnapshotParameters. If this viewport is non-null it is used instead of the bounds of the node being rendered and specifies the source rectangle that will be rendered into the image. In this case, the upper-left pixel of the viewport will map to the upper-left pixel (0,0) in the rendered image. If the viewport is null, then the entire area of the node defined by its boundsInParent, after first applying the transform of this SnapshotParameters, will be rendered. The default value is null.
    Parameters:
      `viewport` - the viewport to set