Class SnapshotParameters
java.lang.Object
javafx.scene.SnapshotParameters
Parameters used to specify the rendering attributes for Node snapshot.
- Since:
- JavaFX 2.2
-
Constructor Summary
ConstructorDescriptionConstructs a new SnapshotParameters object with default values for all rendering attributes. -
Method Summary
Modifier and TypeMethodDescriptionGets the current camera.getFill()
Gets the current fill.Gets the current transform.Gets the current viewportboolean
Gets the current depthBuffer flag.void
Sets the camera to the specified value.void
setDepthBuffer
(boolean depthBuffer) Sets the depthBuffer flag to the specified value.void
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.
-
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. SeeConditionalFeature.SCENE3D
- Parameters:
depthBuffer
- the depthBuffer to set
-
getCamera
-
setCamera
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
-
setTransform
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
-
setFill
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
-
setViewport
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
-